//View Tip #819
Similar Tips
» See your favorite commands
» Count files by type
» Randomize lines in a file
» Sorting debian packages installed by size
» Random line

 

Latest tips by RSS
Click here to subscribe
Follow Shell-Fu on Twitter
Click here to follow
Follow Shell-Fu on identi.ca
Click here to follow
The commmands below show the ten largest files/dirs in the working directory. Both commands give similar results, though handle things slightly differently. The 'du' option is good if you also need sizes of subdirectories, but the 'ls' option gives more detail.

ls -laSh | head -10

du -s * | sort -nr | head -10

I find both to be useful in situations where I need to make more free space.


View Comments »




Comments 

Add your comment

Comments are currently disabled
For human readable file sizes, this seemed to do the trick:

du -chs * | sort -nr | head -10

Sweet - thanks! Shell-fu ftmfw.
Posted 2009-05-22 13:04:36

Home Latest Browse Top 25 Random Hall Of Fame Contact Submit