Using the script command on Linux to record command line activity

The Linux script command has been around for ages and provides a simple but useful service. It lets you record command line activity – both input and output. This can be very helpful in troubleshooting problems or verifying what was done later by reviewing the commands that were run along with their output.

Even if you’ve used the script command time to time, it offers more options than many of us realize. In this post, we will look at the simplest use of script and some of the options that can make it even more useful.

The easiest way to use the script command is simply to type “script” in the terminal window and press ^d when you want to stop the recording. The output, by default, will be saved in a file called “typescript”. You will see the file name that is used in the first line of output.

To read this article in full, please click here

Source:: Network World – Linux