在 Ubuntu 上,如何记录终端的所有输入和输出,不仅记录所有命令,还记录使用 nano
编辑文件时的记录,还应包括对文件的每个更改.
我试过 script
,但它只包含命令,但不包含更改文件的时间。
最佳答案
也许你可以使用ttyrec .官网上有这样的描述:
ttyrec is a tty recorder. Recorded data can be played back with the included ttyplay command. ttyrec is just a derivative of script command for recording timing information with microsecond accuracy as well. It can record emacs -nw, vi, lynx, or any programs running on tty.
我可以用它来记录 vi/vim 的输出。所以它可能对您有用。
要录制终端,只需执行
ttyrec
退出只需输入:
exit
或
Ctrl+D
要重播您的输入和输出,请执行:
ttyplay ttyrecord
关于ubuntu - 如何记录终端的所有输入和输出,包括使用 'nano' 编辑文件时对文件的更改,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43260696/