Record
whatever you do in the terminal.
Have you ever felt that you should record everything you do in the terminal in a file?
Then try out the following tip. In this tip we will see how to record all commands executed in the terminal along with returned outputs to a text file automatically. This may help you better troubleshoot your problems.
Have you ever felt that you should record everything you do in the terminal in a file?
Then try out the following tip. In this tip we will see how to record all commands executed in the terminal along with returned outputs to a text file automatically. This may help you better troubleshoot your problems.
How
to start the recording session:
Open the terminal and run this command to start a session that
will record or store every commands we will type on the Terminal.
#script recordterminal.txt
‘recordterminal’ is the file where All commands entered and
returned outputs will now be recorded into the text file automatically. You can create a file with name to whatewere you want. This
file will be saved in the current working directory.
How to stop the
recording session:
To stop recording, press CTRL+d.
How to view the
recording session:
To view the recording
session read the file by using ‘cat’ command.
#cat recordterminal.txt
How to start the
recording session in the same file:
if you want to continue the session in that same text file.
It’s easy go to terminal and type:
#script –a recordterminal.txt
No comments:
Post a Comment