duHTMLtree is a perl script that I wrote to render disk usage trees in HTML based on the output of the unix du command. The du output file can be generated once, and then duHTMLtree can render multiple trees without incuring the overhead of rumbling your disk for every tree. duHTMLtree can run either as a CGI or from the command line. OmniGroup's DiskSweeper may do something similar with a GUI, though I haven't looked at it.
Sample output can be seen here and here. Read the rest of the hint for the how-to...
Download it with:
curl -o duHTMLtree 'http://www.studiosells.net/msells/duHTMLtree/duHTMLtree'
# now make it executable:
chmod a+rx ./duHTMLtree
As A Command Line Script:mkdir /tmp/disktree ; du -k /some/path/here > /tmp/disktree/duk_mydisk.txt
Then run duHTMLtree with, for example, these options:
./duHTMLtree -s500M '-tMy Disk Tree' -n'My Disk' -c1 \
/tmp/disktree/duk_mydisk.txt > /tmp/mydisktree.html
and then open the resulting HTML file. duHTMLtree -h will show you command line options. The color strings are defined within the script, or you can also pass one on the command line. The obvious way to use it is to generate the duk files through a cron job, say nightly or weekly, possibly on multiple systems and then feed them to duHTMLtree to build whatever trees you want. If you
want to build a single document with multiple trees, use the -b and -l options and build your own document header with relative links.
cp duHTMLtree /Library/WebServer/CGI-Executables \
chmod a+rx /Library/WebServer/CGI-Executables/duHTMLtree
Make sure you have some duk_*.txt files in your SCAN_DIR and then browse to
http://localhost/cgi-bin/duHTMLtree to see the output.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20040923034351201