Thursday, August 28, 2008

Archive last 7days data

find -type f -mtime -7 -print | xargs tar cvf to_test.tar

atime (access time) last time file was accessed
ctime (change time) time inode info changed owner, group, permissions or number of links.
mtime (modification time) time contents of file change

Wednesday, August 6, 2008

Redhat Hardware info

Info from:
http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1218051306170+28353475&threadId=956927

you can collect the system information using following build-in os command.

# dmesg|grep -i cpu
# cat /proc/cpuinfo
# cat /proc/meminfo
# dmesg|grep -i memory
# cat /proc/scsi/scsi
# cat /proc/pci

# cat /proc/cpuinfo|grep "model name"
# cat /proc/meminfo|grep "MemTotal:"

Get redhat release version
[epictide@fezzik bin]$ cat /etc/redhat-release
Red Hat Enterprise Linux ES release 4 (Nahant Update 7)

or you can use 3rd party software to know the system hw configuration. such as
1. lshw, URL: http://ezix.sourceforge.net/software/lshw.html
2. cfg2html-linux, URL: http://www.cfg2html.com/

you can also study from books or redhat official provide documents at following
http://www.redhat.com/docs/