Recording your mistakes

Do you remeber the driving games in the end of the 90’s early 00’s. They had this fun feature of recording your driving from different angles, so you as the player could review your driving and laugh at how bad/good you were performing. Today I just found out the same for the unix terminal. This can real useful if you are documenting some procedures in a shell. Another use is if you are doing some complicated configuration the first time and later use it for reference next time you doing a similar configuration.

So when you start record something you’ll create a script file and a timing file.

And you can start doing the work you need to record. This also records if you are switching accounts, ssh into another machine and so on, which is real useful. When you are done with recording, either write ‘exit’ or hit CTRL+D.

To replay what you’ve recorded you use the command script replay with the same files you just recorded.

And you’ll see that the script is replaying what you did in the console. The -d option is for speeding up the script by 50%. Otherwise it would replay it in the speed you recorded it in.



Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.