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
Or,
[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

Cheers!
DEBU






No comments:

Post a Comment

8c tips for Freshers / NCG's

I have been having a great company with some of the very talented NCG’s ( New College Hires/ Grads ) last ~2yrs.  I work for Intuit I...