Saturday, June 29, 2013

Script command in linux

Script command is very useful way to record logs of any command fired in shell, it logs anything printed on screen.

Example:
--------

script myfile.txt
Will log all results into the file myfile.txt. This will open a sub-shell and records all information through this session. The script ends when the forked shell exits (user types exit) or when CTRL-D is typed.

No comments:

Post a Comment