Linux :: Useful console commands

Get connections count

 netstat -an | grep "\.80" | grep ESTAB | wc -l

Check Folder/Disk size

#folder size in current direcoty
du -ch -d 1
#disk usage
df -h 
cp -R www/link www1/link;

Test Apache Config file syntax and restart

apachectl configtest
apachectl graceful

Find and delete files

find -name '*' -size +1000000k | grep -vE '.zip' | xargs rm -f