Posts

Showing posts from April, 2014

Useful Commands in Linux and centos

Image
/home full issue(creating disk space) find /home/*/ -name .trash | xargs rm -rf ================== changing permission for file only find . -type f -exec chmod 644 {} \; for directory find . -type d -exec chmod 775 {} \;  find /home/*/public_html -iname '*.mp3' -exec mv "{}" /home/delete \;  find /home/*/public_html -iname 'backup-' -exec mv "{}" /home/delete \; ================== How  know the hard drive speed ( this will check how fast the sites are resoving also) Use /dev/hda or /dev/sda or what ever is the drive in the server: hdparm -tT /dev/hda This command will show results like: /dev/hda: Timing cached reads:   8808 MB in  2.00 seconds = 4406.87 MB/sec Timing buffered disk reads:  162 MB in  3.03 seconds =  53.44 MB/sec If the second measurement is under 40MB/sec, the server is too slow and needs a hardware checkup Monitoring the system: Basic command line: pstree Processes a