Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

3 Answers 3

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 :)

share|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

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.

share|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

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/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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