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