ubuntu - 如何记录终端的所有输入和输出,包括使用 'nano' 编辑文件时对文件的更改

标签 ubuntu

在 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/

相关文章:

bash - 在 ubuntu 上查看 OpenMP 环境变量

linux - 内核更新破坏了 CUDA

node.js - react npm start 中的 BROWSER 环境变量不选择自定义浏览器

linux - 杀死斯坦福核心 nlp 进程

ubuntu - gulp -v 安装后报错

ubuntu - 无法重启WSL2,LxssManager卡在停止状态,如何重启?

python - 如何以彩色打印到控制台?

mysql - go-mysql : authentication plugin not supported while connecting from go app container to mysql container

c++ - 找不到“iostream”文件

c# - Dotnet Core Docker 容器在 Linux 上泄漏 RAM 并导致 OOM