Keeping track of everything you do is a good habit. So, why not record your activity on the terminal. You must have thought of recording your session on the terminal.

Linux provides you a command line utility named Script which can be used to make typescripts of your terminal sessions. According to the Description of script on its manpage,

Script makes a typescript of everything displayed on your terminal. It is useful for students who need a hardcopy record of an interactive sessionas proof of an assignment, as the typescript file can be printed out later.

For example, If you want to record your activity on the terminal and store it in a file, enter this in your terminal.

script -a recordfile

So, all the activity on the terminal after this command is appended to the contents of recordfile. See the pictures for illustration.


Screenshot of the terminal



Contents of the recordfile

Rohan Jaswal

Software Engineer at Udemy. Playing around with Python, Java and stuff!


Subscribe

Intuit Mailchimp