A simple way to get a disk space usage summary

May 31, 2006

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 necessary.)

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 interesting, especially /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 machine.)

Written on 31 May 2006.
« Fiddling with X selections from shell scripts
The cynical take on nofollow »

Page tools: View Source, Add Comment.
Search:
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Wed May 31 15:39:23 2006
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.