Finding space hogs

I know this is a common post out there, as a google search will bring this up multiple times, but here it is anyway. A great alias to set up on your system to aid in finding space hogs in a given filesystem or directory is as follows:

alias ducks=’du -cks * |sort -rn |head -11′

Add the aliases to whichever file you keep them in (.bashrc, .aliases, etc)  and then run ‘ducks’ for output similar to this:

194585312       total

36280896        dvd

32974872        Documents

21518768        Security

17339104        Sources

16323048        subversion
14843748        music

Clean, and simple!

Leave a Reply

Your email address will not be published. Required fields are marked *