Tuesday, July 28, 2015

How to record Terminal session?

If you want to record your terminal session for your personal notes or for tutorial purpose you have an in built tool. In Linux's all flavours you get "script" command which record your all work of your terminal.

- How to use
a) open your terminal
b) run "script" command as given below
# script /tmp/record.txt
=> Now your recording has started and session is going to be saved in /tmp/record.txt
d) When you are done stop the recording by ctrl+d
e) cat /tmp/record.txt

This method is used to monitor root activities in my workplace. It copies all the text in standard output to the file you mention in script command.

No comments:

Post a Comment