Setting Up

Open a terminal and install bsdutils Once installed, you will be able to use two commands script and scriptreplay to record the existing session and play back the recording.

Usage

The usage is pretty simple. To start the recording, you just need to use the command: Remember to change the file path to a valid file location. For example, if I want to save the recording to my Home folder, this is what I type: The “-t” flag instructs the script to output the timing data while the “-a” flag instructs the script to append the output. Once you entered the command, you should see the line “Script started…“. Everything that you enter in the Terminal (including its output) will now be recorded.

Once you are done with the recording, simply type exit to end the recording. You should see the line “Script done,…” that denotes the end of recording.

To view the recording, you can either open the saved file (recording.txt) in your text editor or use the command scriptreplay That’s it. While it is simple, it can be really useful for debugging, or even troubleshooting your friend’s computer by showing them what you have typed and the expected output they should see in the terminal. Is this helpful to you? What other uses can you think of? Image credit: Macro Of Digital Dictaphone by BigStockPhoto