用法 0 代表标准输入,1 代表标准正确输出,2 代表标准错误输出 git-repo sync -j $(nproc)--no-tags > sync-`date "+%Y-%m-%d %H %M"`.log 2>&1 参考 Linux输出重定向 >> 文件 2>&1