Tuesday 9 October 2012

Linux for you Admin Tips:2

Linux for you Admin Tips:1
Linux for you Admin Tips:3
Linux for you Admin Tips:4
Linux for you Admin Tips:5

1. How to Record whatever you do in the terminal ?

There is a command named script which can be used with option -a to append the output to a file.
----------------------------------------------
[sankar@new-host ~]$ script -a lfy

Script started, file is lfy

[sankar@new-host ~]$ uname -a
Linux new-host 2.6.18-194.3.1.el5 #1 SMP Thu May 13 13:09:10 EDT 2010 i686 i686 i386 GNU/Linux

[sankar@new-host ~]$ ldd
ldd: missing file arguments
Try `ldd --help' for more information.

[sankar@new-host ~]$ uname -m
i686

[sankar@new-host ~]$ arch
i686

[sankar@new-host ~]$ exit
Script done, file is lfy
--------------------------------
[sankar@new-host ~]$ cat lfy

Script started on Tue 09 Oct 2012 12:33:32 PM IST
[sankar@new-host ~]$ uname -a
Linux new-host 2.6.18-194.3.1.el5 #1 SMP Thu May 13 13:09:10 EDT 2010 i686 i686 i386 GNU/Linux
[sankar@new-host ~]$ ldd
ldd: missing file arguments
Try `ldd --help' for more information.
[sankar@new-host ~]$ uname -m
i686
[sankar@new-host ~]$ arch
i686
[sankar@new-host ~]$ exit

Script done on Tue 09 Oct 2012 12:34:06 PM IST

No comments:

Post a Comment