Few days before, I got to know about the script command in Linux Terminal. It is a recorder inside the terminal. It can record everything you do in terminal for future reference. This recording can be used as a documentation about what happen in terminal. Moreover, if you’re working with Linux Administrator or some of your colleagues at the same time then this can be pretty helpful to record everything you all do.
Script is a command in Linux Terminal which creates typescript that printed in terminal and this typescript can be saved and printed out later. It is very easy to use the script command. What you have to do is, just type script in $prompt, the script will be started and all your work will be saved in typescript file in your current directory.
You may also give the name of file. For example:
$ script mylogs.txt Script started, file is typescript $
Now, whatever you’ll do in terminal that will be saved in file mylogs.txt. To stop this simply type exit or you can press Ctrl+D. For more detail type man script or script -h.