Does anyone know of a per directory ( not per user) disk space usage pie chart generator script for linux? I want to generate a set of web pages that will give me the usage of each directory, and then you can click on the pie-chart segment and see the disk usage of that sub-directory.

link|improve this question

78% accept rate
feedback

3 Answers

up vote 3 down vote accepted

kdirstat is a similar program for KDE. Worst case scenario, if you don't want to do it manually, you can probably borrow the code, or even hack together an automated GUI/saver solution using DBUS.

Anyway, the generate chart type you're looking for is called a "Treemap", so that should help you to track something down. Check out http://www.cs.umd.edu/hcil/treemap-history/

Update: Seems there are both python and ruby libraries:

http://rubytreemap.rubyforge.org/html-treemap.html

http://pypi.python.org/pypi/treemap/1.05

Presumably, you just need to read the directory entries, group them hierarchically (probably in whatever way is most natural to your language of choice; lists and dicts in python, I suppose), and then call the library to generate your output graphic. But this is a guess; read the docs :)

link|improve this answer
1  
kdirstat is awesome, I use it all the time. There's also a windows port, windirstat. – davr Oct 27 '09 at 22:42
feedback

The only app I'm aware of is the Disk Usage Analyzer (under Applications > Accessories) which does almost exactly what you want, but without the web page bit. You could take some screenshots or something I guess.

link|improve this answer
This Disk Usage Analyser is called than way inside the Gnome menu. It is a part of the gnome-utils package known as Baobab. – avelldiroll Oct 27 '09 at 22:17
feedback

If you want to do this on a headless server, and view the data offline, then this is a great option:

http://zevv.nl/play/code/philesight/

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.