Monthly Archives: December 2014

need to list a directory contents as a text file in windows?

cmd

go to the desired dir, then

dir > print.txt

Advertisements

cpanel check disk space and make space

Delete cPanel File Manager temp files

rm -fv /home/*/tmp/Cpanel_*

 

Remove cPanel update archives

/usr/local/apache.backup*

 

Clean up Yum files

yum clean all

 

Remove pure-ftp partials

locate .pureftpd-upload | xargs rm -fv

 

find directories larger than ‘x’mb

du -sm * | awk ‘$1 > 1000’

 

find files larger than 100mb

find . -type f -size +100M -print0 | xargs -0 du -chs

 

tmpDSK removing all files from tmpdsk except the last 6 hours

tmpwatch –all -mf 6 /tmp

 

Type the following command at the shell prompt to find out top 10 largest file/directories:

du -a /var | sort -n -r | head -n 10