preload
Aug 28

Some useful commands to remember:

Find
Find files older than 2 days:


[root@sirius ~]# find /home/ -mtime +2

Find files created in last 2 days:


[root@sirius ~]# find /home/ -mtime -2

Find and destroy files which doesn’t have gid in /etc/group


[root@sirius ~]# find / -nogroup -exec rm -f {} \;

Cut

Get third character from string:


[root@sirius ~]# grep -i ftp /etc/passwd |cut -c3

Sed

Print lines 10-30:


[root@sirius ~]# sed -n '10,30p;30q' current.txt

print line 15:


[root@sirius ~]# sed -n '15p;15q' current.txt
Mar 25

I tested little bit of coding with php at the weekend. It is HEX index which is read from mysql database and generated on the fly.

Mar 08

To get Intel ICH8 work with older distributions like centos you have to give kernel couple of parameters:

pci=nommconf all-generic-ide

To get e1000 network adapter to work you have to compile it manually. Download drivers from Intel’s web page.