Saturday, October 23, 2010

'Script' utility to record your terminal session

Today I was installing something and the ask from my friend at the other end was to let him know how I was doing that. First I thought I will share my screen with him, but wait ! will not a recording of my bash session should suffice his request?

Yes, lets not forget that we have this cool freaking awesome UNIX tool which records and makes a typescript of everything printed on your terminal. Its very popular amongst project students as POC of what and how did they run and tested various scenario;and really helpful for students who need a hardcopy record of an interactive session.

Very easy to use, you can call it a no-brainer to use. When you are ready to record any I/O session just type 'script'.

[root@DebuTestBox ~]# script
[root@DebuTestBox ~]# script -a MyInstallSession_23Oct2010

Now that the recording has started, everything you type, as well as everything that returns as output, will be saved into the filename you chose to output to. If a name is not given, it will store all the I/O of that bash session in a default file viz. typescript on the current folder.

Once done, type ctrl+d or Exit to end your recording session.

[root@DebuTestBox ~]# exit
Script done, file is typescript

And your are done with the recording of the session!! Pass on the typescript whosoever is interested to know what you did in that bash session or rather how in installed that complicated software!! :P


No comments:

Post a Comment

'Optimism Bias' leads to poor decision making!

Effective Time-management and Time-boxing is a concern for 'always ready people'.  Being from a background that I am from,  I am...