Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

Update: Seems there are both python and ruby libraries:

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

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .