Tag Archives: coreutils

Using ncdu to examine disk usage

du has been my go-to tool for checking disk usage and it’s wonderfully simple. But I’ve been using ncdu for a few weeks now.

ncdu is short for NCurses Disk Usage. In addition to being able to visualize disk usage by directory, it lets you sort on different parameters, delete files, show hidden files, and a few more stuff that you’ll miss if you go back to plain du. Most importantly it acts as a file manager, so you can simply enter the directories to see a more fine-grained breakdown of file sizes. As an added bonus it has Vim keybindings along with normal arrow key movements.

ncdu - ncurses disk usage

Screenshot of ncdu + help popup

Installation:

brew install ncdu # macOS
sudo apt-get install ncdu # Ubuntu/debian

false

K. Mandla writes on false:

In fact, it’s anything but helpful. It won’t take help flags. It does what it’s supposed to do, but does it unsuccessfully, every time.

Even the man page tells you that. What’s false? Every time, that’s what. Hardly helpful. Hardly useful. Just … false.

It must be really hard when people expect you to be unsuccessful. 😐

Better cp and mv for linux

K. Mandla has blogged about an interesting patch to GNU coreutils. Even if you’ve used Linux only for a few days, you might know how rudimentary the cp and mv commands are. But there’s an unofficial patch that makes them the way they should’ve been.

That’s the way it should be! That’s what I’m after: Transfer rates. File sizes. A proper progress bar and percent complete, with a second readout for overall progress, as needed. 😀

Just follow the instructions on the site to apply the patch and compile coreutils. Then alias the resulting cp and mv binaries to, well, cp and mv. Make sure to add a -g flag to the aliases to get the progress bars.