Topics

Useful Linux commands

Check Installing CentOS 6.2 on VMware .

– getting full memory info

more /proc/meminfo

memory usage in MB

 -m

– display CPU info & count

awk '/model name/  {ORS=""; count++; if ( count == 1 ) print  $0; }  END {  print " : " count "\n" }' /proc/cpuinfo

– display hard disk info & usage

df -h

– check Linux kernel is 32 bit or 64 bit

 -m

– finding out details

dmidecode | more

sort unix processes on ps by highest memory usage

 -eo pmem,pcpu,rss,vsize,args |  -k 1 -r | more

– list processes

ps -ef 

– get package version

 -qa | grep mysql*

– clear mail queue

rm -f  //spool/mqueue/*

– show total size of each directory inside /path

ls -d /path/*/ | xargs -r  du -