A simple way to get a disk space usage summary
In the spirit of my little shell scripts, here's a simple way to get a useful summary of disk space usage on a Unix system:
du | sort -nr | less
(substitute the pager of your choice for
less, and use '
du -x' as
This is less pretty than the various graphical disk space visualization programs that float around, but I find it gives me pretty much the information I need. It's pretty easy to narrow down what areas of the filesystem, or what specific directories, are using up all of the space.
Applying it to various filesystems on stock machines is often
/var; it's often a bit surprising just how
much space some packages need. (For instance, a surprisingly large
amount of disk space is going to
/var/sadm/pkg on my Solaris test