Friday, March 30, 2012

Find 20 Largest Files on your system

Running out of Disk Space ?
want to see which files are the largest files on your system and are contributing to filling up your hard disk.
Copy and paste the following command into your terminal. and run it in your root directory.


find . -type f -print0 | xargs -0 du -h | sort -hr | head -20


This will  list the 20 Largest files on your System, and report their size in human readable format.

better still, copy and paste the line into a file,
name the file bigfiles
save the file in /usr/local/bin
chmod +x /usr/local/bin/bigfiles
then from anywhere on your system simply type 
bigfiles





No comments: