Debian Package NCDU

We all know that feeling when our disk fills up and you are left desperately scrabbling around to find out where your disk space has gone. In a previous blog post I discussed the use of the wonderful Konqueror File Size View, but this is no good for remote servers. Normally I would resort to “du” or the wonderful “find” utility to look for large files, but here is an interesting alternative that I had not come across before: ncdu (ncurses disk usage).

Its name tells you pretty much everything you need to know. It can be installed with a simple apt-get install ncdu and then the man page is a useful guide. In simple terms it can just be run with:

# ncdu /var

The lovely thing about ncdu is that once it completes its run (which can take a long time on a large disk or a nfs share), you can drill into the directory structure following the disk usage to determine where your space has gone.

It is a very simple program but one that I will find most useful.

comments powered by Disqus