Topics

Useful Linux commands

Check Installing CentOS 6.2 on VMware .

– getting full info

more /proc/meminfo

– display memory usage in MB

free -m

– display CPU info & count

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

– display hard disk info & usage

df -h

– check kernel is 32 bit or 64 bit

 -m

– finding out hardware details

dmidecode | more

sort unix processes on ps by highest memory usage

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

– list processes

ps -ef 

– get package version

 -qa | grep *

– clear mail queue

rm -f  //spool/mqueue/*

– show total size of each directory inside /path

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