Server Fault is a question and answer site for system and network administrators. 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

There are some programs which can display used disk space using a treemap, such as WinDirStat for Windows and KDirStat for KDE/Linux:

KDirStat screenshot

I'm looking for something similar, but for a headless Linux box. (E.g. run console data collection program on the server, then load the file in a graphical program in a GUI environment.)

Alternatively, what are other good ways to get a structured used disk space representation, with just SSH access?

share|improve this question
this javascript parses du output:… – eadmaster Nov 8 '13 at 8:38
up vote 15 down vote accepted

NCurses Disk Usage (ncdu) is good for this. See for details. It's available as a package for most popular distributions and lets you browse and find out where your disk space is used. It uses text characters to display a bar-chart of directory usage so you get a semi-graphical interface, in a text only environment.

share|improve this answer
This one is awesome, highly recommended. – romkyns Oct 7 '11 at 10:10

gt5 is very nice. It has a console interface and also creates html files you can view in your browser. It's in the repositories so you can just apt-get it.

share|improve this answer
nice one....wasn't aware of that package. – 3dinfluence Mar 8 '10 at 18:21
I've been using gt5 for a while, but it has one considerable flaw: if you have a lot of files, gt5 ironically requires a considerable amount of disk space (hundreds of megabytes) to generate the results. – Vladimir Panteleev Aug 24 '11 at 0:36

xdiskusage allows you to pipe the output of du into it for analysis. It's a great option.

share|improve this answer

I use du -cks * | sort -rn | head -11.

It shows the top ten directories by disk consumption. I use it on /home and such all the time.

share|improve this answer

For headless servers philesight might be of great use.

(kludos for that gem go to

share|improve this answer

You can run the same command if you connect on the server via ssh and use ssh X forwarding and an X server on your workstation. If you want from commandline:

df -k /*|sort -n
share|improve this answer
Yeah, that's obvious, but I don't want to install KDE on a server :) And I was looking for a nicer/more structured method than just sorting all files by size... edited question to clarify. – Vladimir Panteleev Mar 8 '10 at 18:17

protected by MadHatter Nov 8 '13 at 9:02

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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