Friday, July 27, 2012

Use "script" to record the commands you have executed

If you need documentation on the commands that you will perform on a linux shell, you can script to record it and store it in a file when you are finished:

138:myserver user$ script record.txt
Script started, output file is record.txt
bash-3.2$ whoami
user
bash-3.2$ exit
exit

Script done, output file is record.txt
138:myserver user$ cat record.txt 
Script started on Fri Jul 27 23:02:44 2012
bash-3.2$ whoami
user
bash-3.2$ exit
exit

Script done on Fri Jul 27 23:02:47 2012

No comments: