//View Tip #819
» Count files by type
» Sort the lines of a file by length
» Top ten running processes
» Random line
Similar Tips
» Sort a file by line length» Count files by type
» Sort the lines of a file by length
» Top ten running processes
» 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.
I find both to be useful in situations where I need to make more free space.
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.
Comments
Add your comment
Comments are currently disabled


du -chs * | sort -nr | head -10
Sweet - thanks! Shell-fu ftmfw.