我正在學習 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).