我正在学习 ruby 并按照书中的教程进行操作。我想记录我在 shell 中输入的所有命令(我使用的是 zsh)。我该怎么做?我应该能够停止并开始录制。
答案1
使用script
命令
DESCRIPTION
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).