Disk space analyzers – updated version

I’m planning to upgrade to Intrepid soon but before that I want to make backups of all my data and config files. I have two external 250G LaCie USB2.0 disks that I use in turns to make backups (so I always have two backup versions around). The problem is now that my home dir is around 300G so I need to find stuff I don’t want to back up so I tried some disk space analyzers from Hardy repositories to see what takes that much space.

Update: I wrote this yesterday and got some good tips in the comments so I quickly tested some more tools to get a better coverage of the software to see what’s eating your disk space.

Because of the nature of the programs they all require some time at first to scan through the file structure to be able to create the view. I can’t say which was the fastest, they all took some minutes to scan through the 300G on RAID0.

du

du is a default tool installed in ~all Unix systems. It runs on command line and shows you a list of the files and folders and how much space they take. It’s pretty handy with grep to search for files or folders that take gigabytes: du -h –max-depth=1|grep G would show you all files and folders that recursively take 1G or more. du -hs shows the total of the dir where you are at.

du -hs

du -hs

ncdu

ncdu is a lightweight command line NCurses Disk Usage tool. You give it a dir, it scans it and shows a graphical representation of the file sizes. You can also browse the directories very fast as well as delete files/directories. First you better check the manual for the keycommands. To try it, install the package ncdu.

ncdu

ncdu

Filelight

Filelight shows the disk space use as a circle diagram. I think it’s very difficult to actually see there how much space things take. For some reason it’s just messy. Can be found in the package filelight.

Filelight

Filelight

KDirStat

KDirStat shows a treemap (ie. boxes of different sizes) of the files. Depending of how deep a file is in the hierarchy different colors are used. Here it’s easy to find big files when you change the view settings from the default: uncheck the ’squarify treemap’ and ‘use cushion shading’ checkboxes and it’ll look a lot better. KDirStat is also able to do some cleaning, didn’t try that though. I’d like to have some information about the files without having to click the box – maybe something in the status bar or tooltip or something? Check the package kdirstat.

Customized KDirStat view

Customized KDirStat view

Xdiskusage

Xdiskusage is a nice simple tool that does what you’d expect it to do: show the file/folder sizes graphically with no hassle. You can set it to view files largest/smallest first, alphabetical/reverse alphabetical or unsorted. You can copy the list as text to be used on other applications, hide files/folders you don’t want to see and so on. Can be found in the package xdiskusage.

XDiskUsage

XDiskUsage

Gnome Disk Usage Analyzer / Baobab

Reported in the comments I had to go and find a Gnome desktop to try this with :)

Baobab is included in default Ubuntu installation. It’s also known as (and can be found in the menu with the name of) Disk Usage Analyzer. It’s again a simple tool to show the stats. You can use it to move files to trash and show a separate ‘graphical usage map’ for selected folder. This is not for me: as I wrote earlier, the circle view is not for me, I just think it’s difficult to read. The graphical usage map is only a view full of boxes that represent the sizes of corresponding files. The only problem is that you don’t know what files they refer to nor can you move the files to trash so it’s only a lousy background generator. You can’t either change the colors or anything in the settings, only the disks to use (yes, I’m not a Gnome fanboy..). But I guess for Gnome users it’s an easy tool to quickly check the usage since it’s installed by default (available in the gnome-utils package).

Disk Usage Analyzer

Disk Usage Analyzer

KDE / Konqueror File Size view

Konqueror has a plugin that shows you file sizes graphically and lets you do the stuff that you would be able to do with the normal view: copy, move, print, send, compress and so on. In the menus you’ll find many options to define how small blocks are shown, what is the coloring based (size, depth, MIME etc), what information to show in the blocks or how deep the scan should go and so on. I wasn’t able to find ane big differences between the KDE3 and KDE4 versions, they both do the same tricks. I think this plugin just works and as said – it’s easily available and nicely integrated for KDE users. For KDE3 install the package konq-plugins (not sure if it’s installed by default) and for KDE4 konqueror-plugin-fsview-kde4.

KDE3 File Size view

KDE3 File Size view

KDE4 File Size view

KDE4 File Size view

Conclusion

So du is always around and can be run on the command line, like ncdu. The default KDE or Gnome tools are easily available. I guess the Konqueror file size view is my choice: well integrated, shows clearly the file sizes, can be used to move/delete/copy/trash files and is customizable – thats all I need. What’s your choice?

Related posts:

Tags: , , , , , ,

  1. zerwas’s avatar

    Also have a look at Disk Inventory X: http://www.derlien.com/

  2. Jeff Schroeder’s avatar

    You left out the default gnome tool for this, baobab. It should be installed by default in Hardy.

  3. Corey Burger’s avatar

    Wow, utter fail to showcase the one tool that is actually installed by default in Ubuntu.

  4. Vadim Peretokin’s avatar

    Hm yeah the default disk space analyzer that’s in Ubuntu and is probably most commonly used was missed ;)

  5. gordallott’s avatar

    i never use anything but disk space analyzer, its the best most descriptive thing around. i use it all the time indeed. i’m really quite supprised you didn’t include it in this roundup.

  6. Risto H. Kurppa’s avatar

    @zerwas: If I read correctly Disk Inventory X is for Mac OS X and it’s layout algorithm is based on KDirStat. I’m running Kubuntu Linux here and wanted to test the tools available from the default repositories.

    @all: I’m using Kubuntu and I don’t feel comfortable installing gnome-utils package that includes baobab (=disk space analyzer) though I agree that I should have installed Gnome on Virtualbox or something to check baobab. Anyway, if you look hard enough you see that baobab is mentioned in the ‘Other tools’ paragraph as an option :)

  7. jcartledge’s avatar

    The konqueror file size view plugin is available for kubuntu 8.04 in konqueror-plugin-fsview-kde4.

  8. andrew’s avatar

    if you’re looking for something really lightweight, i’d recommened ncdu. it’s baisically an ncurses version of boabab. it’s all on the terminal, but it’s easy to use and it’s suuper lightweight.

  9. Risto H. Kurppa’s avatar

    Thanks you all for your feedback! I’ve now added some more tools in the list for you to check.

  10. Risto H. Kurppa’s avatar

    HS: Thanks for the addition!

  11. smok3’s avatar

    the absolute deal maker is this so far:

    sudo find / -type f -size +100000k

    (found stuff in my borken trash-can, and such…)

  12. Risto H. Kurppa’s avatar

    smok3: indeed, very useful to find the big files eating the space!

  13. töff’s avatar

    Konqueror Filesize View is the only choice with *labeled* squarified treemaps. Epic win.

  14. Mauricio Kanada’s avatar

    There is another tool, not specific to Linux (runs in Windows, OS X, Solaris, etc). It is a demonstrations of one very good Java Library named JGoodies.

    Despite of being a demonstration, it is a complete application. It has some interesting features like ordering directories by size or by number of files, find 50 largest files of one subtree, size distribution (may be your space are in small files, not on large ones).

  15. Mauricio Kanada’s avatar

    Sorry, the link to download JGoodies JDiskReport is here:
    http://www.jgoodies.com/downloads/index.html