Oct 10, '03 10:08:00AM • Contributed by: cfoster
Does it ever seem like you should have more disk space but you can't see to track down where it's being used? Using Get Info to figure out where you are wasting disk space can be useful, but it's overly cumbersome when you have to get info about each item individually. It also doesn't easily reveal data stored in invisible folders.
The du Unix command is very useful in some instances, but by default runs recursively, providing too much information to be useful in a broad disk usage audit. However, if you add the following command to your .login, you wil have access to a very simple Disk Usage summary utility:
alias dus 'du -Psckx * | sort -nr'
Alternate between using this command and then cd'ing to hot spots to quickly track down what's chewing up your disk space. For instance, I found I had left a 5GB folder of video footage on OS 9's hidden 'Desktop Folder.'
Thanks to the unix gods over in the MacOSXHints forums for greatly simplifying this command for me -- it used to pipe through awk -- messy!
Warning: If you perform this request at the root ('/') of your hard drive, it will likely take a long time to get through your /dev and /Volumes folders. There's nothing wrong with doing that (and that's how I found that 5GB), but it will likely take longer.
