2010-07-05

Which Directory is Hogging the Hard Drive?

Pretty basic tip for today, but one many people struggle with when they find themselves low on hard drive space on their Linux system.

For the current directory and subdirectories...
du | sort -g

For the entire drive (will likely take a while and must either sudo or perform as root)...
du / | sort -g | tail

Which users are keeping the most in their home directories (again, sudo or root)...
du /home --max-depth=1 | sort -g

For Windows users, the graphical tool WinDirStat is available.

For Android users, there's DiskUsage. (Also available in the Google App Market, but I refuse to put market:// links until the App Market is available for general use.)