Many times, you would like to record every work and commands in the terminal session. In the situations like checking the server’s status, testing new softwares, changing the configurations, fighting with crackers.. things like that.
In that moment, you don’t have time to take notes on every commands, but trying to get the system running. However, you will also want to check the log of the commands and outputs.
There is a very useful command named script (1) in the bsdutils packages. The software will help you make typescript of everything printed in the terminal, including your input. So, you can use this software to record your works, and review it later.
No only the things printed in your terminal, you can also save the timing data with ‘-t‘ option. The timing data will be outputted to standard error, you can save it by redirect the standard error to a file. Then you can play back the typescripts by scriptreplay (1).
Therefore, you could show how you get thing down to your friends/colleague by playing the typescript. Just like watch a movie.
For a easier usage, I wrote a small script. The script will help me save the typescript in the filename I assigned or time stamp.
Usage is very simple
$ ./script.sh # save the typescript as time stamp filename $ ./script.sh mission-critical.log # save the typescript as mission-critical.log
This is a tip for Debian GNU/Linux.