terminal开了许多窗口,跑了很多命令,想要把它们记录下来,很笨的方法就是shell-export text as。
但是更简单的方法就是,自动让他记录。
当你打算开始记录一段命令的时候,输入
script screen.log
从现在开始你的一切都将被记录下来到screen.log里面,一直到你结束它
Now, until you stop the script, all input and output in the Terminal will be stored in screen.log.
结束时候,输入
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