將make 過程輸出到檔案

輸入以下指令,可以將make 的過程輸出到檔案。

make過程中,stdout 和stderr 結果都輸出到檔案中,且螢幕上不會顯示。

make &> compile_log
make 2>&1 | tee compile_log

同時存到檔案和顯示在螢幕上

make 2>&1 | tee -a compile_log

發佈留言