Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm looking for a linux alternative to WinDirStat. I would like to know what is taking up space on my hard drives.

A program that works on console and doesn't require a UI is preferred .

share|improve this question
    
you might wanna accept one of the answers –  Tshepang Jan 6 '11 at 1:46

8 Answers 8

up vote 20 down vote accepted

Based on your issues in installing ncdu my recommendation would be to use du and sort on together.

For instance:

  • du /home | sort -rn (will search all files/directories under /home and sort them by largest to smallest.
  • du -h /home | sort -rh (same but will show it in MB/KB/etc) - Note this requires coreutils 7.5 or newer (sort --version to check)

You can replace /home with any directory of your choice.

share|improve this answer
    
That's excellent, thanks for the help. My coreutils is 5.97 - is this why the sort order of du -h isn't right? –  ripper234 Nov 12 '10 at 11:26
    
Yep, you'd have to settle for du /home | sort -rn with coreutils 5.97 or use some 'magic' with perl etc as demonstrated over on ServerFault (serverfault.com/q/62411/60012) –  N J Nov 12 '10 at 11:27
1  
OTOH if there is a big sub-sub-directory its bloat will show multiple time (for that dir and each parent dir) at the top of the results, and IMHO that distracts from the true bloat. Using "ncdu" suggested below could help with that, I'm gonna try it. =) –  lapo Jan 13 '11 at 21:39
    
I find the -size option to "find" useful as well, as it lets you find all files under a certain. At least for GNU find, you can do something like: "find . -size +100M" to find files larger than 100M below the current directory. –  gabe. Feb 2 '11 at 4:48

If you want a command-line tool, I prefer ncdu, an ncurses version of du. It scans the disk (or a given folder) and then shows the top-level space usages; you can select a given directory to get the corresponding summary for that directory, and go back without needing to reanalyze:

Screenshot of ncdu


If you're ok with a GUI program, Filelight is the closest thing to WinDirStat I've found; it shows a graphical view of space consumption:

Screenshot of Filelight

Like ncdu, Filelight lets you select a given directory to get the breakdown for that directory

share|improve this answer

Another GUI program is: baobab

alt text

share|improve this answer
    
In deed, if I'm on Ubuntu I won't bother to look for any alternative. baobap is just enough. –  phunehehe Dec 27 '10 at 4:09

There's also this cool python script from /www.vrplumber.com/programming/runsnakerun/

bzr branch lp:~mcfletch/squaremap/trunk squaremap

It's not the most feature rich, but it's run from a single python script so it's extremely portable.

alt text

share|improve this answer

You should be aware that WinDirStat is actually a port of KDirStat, which is a Linux/KDE program. So, if you are looking for a Linux alternative to WinDirStat, you certainly should take a look at KDirStat. It is already packaged in most distros, just install it.

Another alternative is FileLight, already cited by Michael Mrozek, and the Konqueror plugin fsview (you can run it standalone from the command-line).

share|improve this answer
2  
Wow, I never realized that (I guess "Win" in the name should've been a giveaway). A coworker once asked me if there was a Linux version of WinSCP; I died inside a little –  Michael Mrozek Nov 13 '10 at 3:27
    
@previous comment. ouch. Just ouch. –  David Oneill Nov 16 '10 at 20:36

You could also try GD Map, another GUI tool based on treemaps.

share|improve this answer

I have recently used command line tool (CLI, not TUI): http://zevv.nl/play/code/philesight/

It produces a PNG file which you can view somewhere else. It also has a CGI script.

Most likely you are not limited to text mode at your local workstation, so it should be appropriate.

share|improve this answer

If you looked at the about screen on windirstat it showed you that it's based on kdirstat.

http://kdirstat.sourceforge.net/

share|improve this answer
    
I like the answer - but could you add some context or details? –  Volker Siegel Aug 28 at 9:09

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.