linux 脚本保留日志时间:2023-03-10 08:02:53 使用tee使屏幕和文件都输出日志。 2 >&1中 2是错误输出,1是标准输出, 2>&1是标准和错误一起输出。 repo sync 2>&1 | tee -a alex.log