如何log你的command line

terminal開了許多窗口,跑了很多命令,想要把它們記錄下來,很笨的方法就是shell-export text as。
但是更簡單的方法就是,自動讓他記錄。
當(dāng)你打算開始記錄一段命令的時候,輸入

script screen.log

從現(xiàn)在開始你的一切都將被記錄下來到screen.log里面,一直到你結(jié)束它
Now, until you stop the script, all input and output in the Terminal will be stored in screen.log.
結(jié)束時候,輸入

exit

Your screen.log file will stored in the local directory. If you want to redirect it, use an absolute pathname such as~/screen.log. This will do exactly what you are looking for.
查看你的screen.log方法是,

cat screen.log
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容