script ( terminal 記錄工具 )

script

它是可出將 terminal 輸出的文字寫入到檔案內

# script -t 2>~/upgrade-lenny.time -a ~/upgrade-lenny.script

-a            Append the output to file
-t             Output timeing data to standard error

Output timeing data:

<time elapsed since the previous output> <characters were output this time>

 

重播 upgrade-lenny.script 的過程
# scriptreplay ~/upgrade-lenny.time ~/upgrade-lenny.script

 

Remark:

script 及 scriptreplay 是在 bsdutils 包內的

Creative Commons license icon Creative Commons license icon