Thursday, December 9, 2010

Record Bash session to a file

from
http://www.devdaily.com/blog/post/linux-unix/use-unix-linux-script-command-record-your-command-line-i-o

Record a bash session with script.  Another way to record a session is to redirect stderr into stdout, and the tee the output to both the original stdout and a file.  This program is much simpler, and may pick up a few messages that seem to try to go around the stderr redirect in some programs you may run.


The script command is usually a no-brainer to use. When you're ready to start recording the input/output of your login session, just type:

script

at the command line. You'll get a message back from the operating system that looks like this:

Script started, file is typescript

No comments:

Post a Comment