如何记录终端会话?

如何记录终端会话?

在 Putty 会话中,我们可以将会话记录在文本文件中。同样,我想将Ubuntu终端的会话记录在文本文件中。

是否可以?如果是,我该怎么做?

答案1

查看 ”脚本”。

从 ”人脚本”:

script  makes  a  typescript  of everything printed on your terminal.
It is useful for students who need a hardcopy record of an interactive
session as proof  of  an  assignment, as the typescript file can be
printed out later with lpr(1).

If  the  argument file is given, script saves all dialogue in file.
If no file name is given, the typescript is saved in the file typescript.

相关内容