record a linux session

Posted: November 11, 2009 in linux

How to record a linux session

If you want to record your linux session with given commands and their outputs, just use the script command as below:

script session.log

it basically forks a new shell so that if you want to stop session recording, just type exit or press CTRL-D After all, you can find session records in session.log file.

 

Another interesting usage of script utility, redirect your typed characters to another user’s terminal who is logged on telnet/ssh or like that. To do this, you must learn devpts number of that person (it’s included who command’s output) and if it is 7 for example:

script /dev/pts/7

will redirect all typed characters to that user’s terminal window.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s