useful linux commands for non sys admins
Monday, December 31st, 2007We just had a minor crisis with our dedicated server (thanks to Fasthosts sceurity breech and the subsequent roor password changes) and I’ve learnt these new shell comands:
postfix flush
flushes the mailqueue
du --max-depth=1 /home/ | sort -n -r
lists the sizes of folder when you cannt work out where all the massive log files are located!
find /home/default/selfadhesivelabels.com/system/mail/users/spam/Maildir/new -name ‘*.*’ -print0 | xargs -0 rm
deletes all our stored spam (when you have over 100,000 to delete and normal rm dosnt work!)
I hope this is useful for someone.