Script to build system information. Guru needed :)
Slowly building my "disaster assurance" strategy on top of the file backups.
Amongst other things I want to periodically run a shell script that
would build a file with useful information. Here it is:
lsmod
lspci
dpkg --get-selections
sudo fdisk -l /dev/hda
df
uname -a
Now the questions:
1) Other useful commands I am not thinking about ?
2) I would like to redirect the output to a file called with the
catenation of 'uname -n'.'uname -r'.config.YYYYMMDDHHMM.txt where
YYYYMMDDHHMM is a timestamp of the command execution time. How do I
obtain such value ? How do I create the required backticks on my laptop
keyboard (no separate numpad)
3) If I use cron to run this everyday, being this a laptop client, will
the due command be executed if it's natural time has expired ?
4) What is the easiest way to keep the last N versions of such files ?
TIA,
Bob
Reply to: