Dec 092012

In the past I’ve wrote an article about the commands du and df that can respectively give you information about the Disk Usage and the Disk Free of your Linux computer.
I personally use both of these commands a lot of times at work to check file system and/or directory, but I also understand that on a desktop with Linux you could use something more graphical to see the status of your partitions or directories, so today I’ll show you some programs that can achieve this goal: baobab, cdu, ncdu, JDiskReport and Filelight.

Baobab aka Disk Usage Analyser

Baobab recently changed name in Disk Usage Analyser, a bit more generic and less romantic perhaps but now you can’t tell that is not clear what this program do.

Disk Usage Analyzer is a graphical disk usage analyzer for the GNOME environment. It was part of gnome-utils, but was split off for GNOME 3.4. The software gives the user a menu-driven, graphical representation of what is on a disk drive. The interface allows for selection of specific parts of filesystem being scanned so a single folder, the entire filesystem, and even remote folders and filesystems can be scanned. The graphical representation can be switched between a ring chart and a treemap chart so the presentation can be tailored to the specific content being scanned


Some of the interesting feature included in this software are:

Full filesystem scan
With this option you’ll get a nice overview your whole disk.
When the scanning process ends up, you will get the full tree of your filesystem, like the one in the previous Figure.

Single folder scan
Useful to scan just a single directory and get info about all the subdir and its files.

Remote scan
If you need to scan a remote server-folder, just click on the toolbar icon Scan Remote Folder or select Analyzer → Scan Remote Folder from the menu and you will get a dialog box where you can select the protocol, username/password, The destination IP and directory.
Disk Usage Analyzer can connect to a server through ssh, ftp, smb, http and https.


cdu (for Color du) is a perl script which call du and displays a pretty histogram with optional colors which allow to immediatly see the directories which take disk space.

With no arguments, cdu reports the disk space for all subdirectories of the current directory.
With only one directory argument, cdu reports the disk space for all subdirectories of the given directory.
You can also call cdu with no predefined options.


Some of the most important options that you can use with cdu:

-d, –du option
A list of option to pass to the du command. To avoid some errors, if option -n is not given, the only available options are “bDhklLmx” (e.g.: to use the -h option of du to have sizes in human readable format: -dh).

-F, –file
Takes recursively all files from given directories. Total size is only the size of all files without the size of the directories.

-i, –intelligent
colors according to the size.


NCDU (NCurses Disk Usage) is a disk usage analyzer with an ncurses interface, aimed to be run on a remote server where you don’t have an entire graphical environment, and you have to work on a simple terminal on a SSH connection. ncdu aims to be fast, simple and easy to use, and should be able to run in any minimal POSIX-like environment with ncurses installed.

Ncdu is entirely written in C released under a MIT license and available as package on the repository of the main distributions.

This is a screenshot after a successful run :

Basic Usage:

To scan and browse the directory you’re currently in, all you need is a simple:


If you want to scan a full filesystem, your root filesystem, for example, then you’ll want to use -x:

  ncdu -x /


JDiskReport enables users to understand how much space the files and directories consume on a disk drive, and it helps users to find large, old, and obsolete files and folders.
JDiskReport analyses your disk drives and collects several statistics which you can view as overview charts and details tables.

As you can probably imagine JDiskReport is wrote in java and should run on any computer with a Java Virtual Machine version 1.5 or later.


Features include:

  • Scan a file tree
  • Scan home directory
  • Quickly analyses a drive or folder that has been recently analysed
  • Run JDiskReport from a command line
  • Top 100 Lists – This is a list of the 100 largest files, least recently modified files, and most recently files.
  • Size Distribution · The size distribution views help you to learn more about the different file sizes that exists on your disk drives
  • Modified Distribution – provides you with information about when how much space and how many files have been modified
  • Type Distribution – collected from the file extensions that exist on the analysed file tree

JDiskReport is available as package on the getdeb repository, for Debian, Ubuntu and Mint.


Filelight is a KDE (available for KDE3 and KDE 4) graphical disk-space analyzer that creates an interactive map of concentric, segmented rings that help visualise disk usage on your computer, as graphical output is similar to the first software of this article Baobab.

Segments are sized in proportion to their filesize. Segments can be nested, so for example, /home/mxcl will be one level outwards and within the bounds of the segment representing /home. Segments are labeled and hovering the mouse over segments will give you more details of that segment and its child segments.

You can open directories with Konqueror or Konsole using the context menu for that segment. Middle clicks open files by mimetype.

Filelight is available as package in many distributions and also on the main repository of ubuntu/Debian and Mint.

Basic usage

To launch Filelight, open Applications -> Accessories -> Filelight. In Filelight main interface, you can either click one of your disks for a global scan, or use the upper right dialog box to insert a path of your choice such as /home.


Popular Posts:

flattr this!

  8 Responses to “5 ways to check your disk usage on Linux”

  1. how about df -h ?

    • Good to see how much disk is used in a partition not in single directory, i.e on my desktop I’ve just 2 FS / and /home to understand which directories use more space under / I’ve to run a du -hs or one of these programs

  2. As usual, KDE users are forgotten. There is a very good KPart usable inside Konqueror… Why not to mention it ?

    • I’m sorry I use XFCE and so usually I’ve some Gnome compatible software on my machines, anyway I’ve included filelight for KDE users.
      Glad to know that there are nice alternatives.

  3. KDirStat is the best for KDE. I use it frequently. It allows deleting files directly from the display, and can list files by type of file.

  4. Then there’s also the old reliable

    du | xdu

    which gives you a grapical overvew that you can mouse into to examine particular subdirectories.
    And mouse outward, too, by clicking near the left edge of the window.

    – hendrik

    • I’ve never used xdu, thanks for the info.

    • I have used xdu since it first appeared in the X Windows FTP repository, in the later 1980′s.
      Yes it is that old, and it is still useful to me. The application is now dated, does not handle window updates very well, not very colorful and limited graphical output. It can also get things a bit wrong when you get lots and lots of small sub-directopries in a large directory.

      However it has one MAJOR thing going for it. It takes a du-like file list. that is a depth first list of a NUMBER and PATH. This mean you can not only use it for DU, but for other things.

      Also when you deal with VERY larger file systems (suchas a goggle earth -tiled image directory tree) it can take hours to recursivally scan that tree. Being able to save the ‘du’ output and graphically display it without needing to rescan is extremely useful. This becomes even more important if using slow and big USB Terrabyte disk drives! I wish the other utilities (baobab etc) could take (or save and re-load) a du-like text file listing and just re-display it, without needing to slowly rescan that disk!

      If anyone else has other ‘xdu’ like graphical utilities I would love to hear about them!

 Leave a Reply




You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>