π

Visualizing GNU/Linux Disk Usage with xdu

Show Sidebar

Now and then, everybody has to look out for folders on the hard drive which do consume unusual amount of space for a variety of reasons. A very handy tool I am using on GNU/Linux since many years is xdu (screenshot). The tool is using the visualization technique called layered space-filling tree browser to quickly give you an overview of what (sub-) directories occupy what amount of disk space.

The usage in the command line is pretty easy:

du | xdu	  

If you want to get insight on the usage on a remote host, you can also use a temporary file:

du > 2014-03-25-hostname.du.log	  

On localhost, you can do the analysis with:

scp remoteuser@remotehost:2014-03-25-hostname.du.log .
xdu < 2014-03-25-hostname.du.log	  

The interface looks pretty simple and it is actually simple. It gets the job done. You can navigate through sub-trees by using your mouse and clicking on any directory.

Have fun.

By the way, on OS X I am using Disk Inventory X for the same reason. It's not that fast but more fancy than xdu. However, I seldom use any of those additional features.

Comment via email or via Disqus comments below: