Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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: code.google.com/p/treemaplib/source/browse/trunk/TreeMapJS/… –  eadmaster Nov 8 '13 at 8:38
add comment

7 Answers

up vote 9 down vote accepted

NCurses Disk Usage (ncdu) is good for this. See http://dev.yorhel.nl/ncdu 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
add comment

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. –  CyberShadow Aug 24 '11 at 0:36
add comment

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

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

share|improve this answer
add comment

For headless servers philesight might be of great use.

(kludos for that gem go to http://www.makeuseof.com/tag/how-to-analyze-your-disk-usage-pattern-in-linux/)

share|improve this answer
add comment

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. –  CyberShadow Mar 8 '10 at 18:17
add comment

What Mircea said makes sense. I would also check the programs and run them from the command line with -h or look at the man page. They might be able to be run from the command line and output to an image files (like .png) instead.

share|improve this answer
    
I would also bet there are some perl cpan modules for this sort of thing. –  Kyle Brandt Mar 8 '10 at 18:10
add comment

protected by MadHatter Nov 8 '13 at 9:02

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

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.