Weighing in with Ncdu

Ncdu

Article from Issue 214/2018
Author(s):

Ncdu adds some GUI-like features to the classic du command.

The du (for "disk usage") utility is a useful tool for estimating file size and cleaning up a hard drive. du summarizes the disk usage for each file in the directory and even looks down into subdirectories.

du worked well in the old days of printed output, but in today's interactive environments, it has some limitations. Like many old-school command-line tools, du prints the output on the screen by default, and the terminal screen is nowhere near large enough to see all the files in a large directory system. Of course, you could print to a file and examine the file with a text editor, or you could filter and refine the du results using standard command-line piping and sorting techniques. But sometimes what you really want to do is move around in the output as if perusing a printed page, progressing interactively through subdirectories as you would with a GUI-based file manager.

The Ncdu utility [1] is a souped-up version of du that has some GUI-like features. Ncdu uses the ncurses API [2], which is a common tool for building GUI features into command-line programs. (See the box entitled "Why Work in the Terminal?")

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Charly's Column

    I’ve never heard of an admin having to remove disks from a server because of a chronic lack of data, but full disks are part of the daily grind. The du clone ncdu will help slim down your data.

  • gdu, godu, duf

    Three modern tools, gdu, godu, and duf, make the task of checking the utilization level of hard disks easier thanks to fast execution speed and a good graphical implementation.

  • broot

    The broot file manager guarantees clearer, quicker navigation of the directory tree at the command line.

  • FOSSPicks

    Graham checks out VLC 3.0, MenuLibre 2.1.5, Texttop, Flameshot, Chomper, Godot 3.0, and much more!

  • FOSSPicks

    This month Graham checks out OpenRGB, QMPlay2, OctaSine, HiFiBerryOS, Speed Dreams, and much more!

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News