ncdu: NCurses Disk Usage (an updated fork)

44 points by rcalixte a day ago on lobsters | 18 comments

taschmex | 23 hours ago

Some relevant context is that the original author, yorhel, passed away earlier this year.

I didn't know this. Tragic news. I've used ncdu for many years. Tremendously useful piece of software. It turns the task of freeing up disk space from an annoying chore to a satisfying like break.

RIP. If only each of us would leave something as useful in the world.

Damn, 38 years old. Goes to show how thankful we should be for being here. Have you hacked something today? Have you had a good time today?

leela | 19 hours ago

That is so sad to hear. I listed ncdu as one of my favorite shell tools, so I'm glad it's getting picked up again.

tuxes | 18 hours ago

Signal boost btdu which offers the same UI but for btrfs.

What it gains from specialising to btrfs is that rather than traversing your filesystem (which can take a long time, especially if you include snapshots), it samples your blocks, and so very quickly finds where the large files are, regardless of which subvolume/snapshot they're in.

[OP] rcalixte | a day ago

This project carries significance for me, not only as a learning resource but also for future projects which is why I've forked and will aim to maintain it for the foreseeable future. I'm still getting familiar with the codebase beyond what was required to update it so any potential issues will be handled on a best-effort basis. I didn't see any actionable issues in the issue tracker but that doesn't mean there aren't things that can be implemented or improved upon. I aim to implement some form of CI/CD at some point as well.

sanqui | a day ago

I'm a ncdu user, so I'm excited to see it updated. It would be nice if any updates you make eventually land in Debian and Fedora.

[OP] rcalixte | a day ago

Debian is still stuck on packaging Zig (1 2) so it might take a while longer there unfortunately. Fedora is already packaging an alternate fork of this project as well. (I've been aware of at least the one other fork but didn't agree with some decisions made, hence this fork.)

donio | a day ago

Could you tell us a little about the post-fork work you have done so far? The commit messages are not very descriptive and some of the diffs are quite big. On a quick glance it seems to be focused on keeping up with Zig language and library changes?

[OP] rcalixte | a day ago

That's about it. The noisiest parts of the diffs are zig fmt and Zig 0.16's Io changes. If you view them with whitespace changes disabled, it should be easier to parse. I think the original project was mostly feature complete save for maybe multithreaded scanning. I want to update the README with installation instructions and so on at some point as well. Future projects based on this project will feature more opinionated changes.

My favourite tool in this space is duc, which separates the scan and view stages so you can schedule the scan, and the view stage is fast. I think I originally found it due to its exploding-pie style graphical viewer, but I mostly use the NCurses-like TUI viewer.

MoonlitKnight | 10 hours ago

That looks interesting, thanks for highlighting it.

Sanity | 10 hours ago

duc is very nice, but for some reason it always crashes when I try to use it interactively. (I can scan fine, and generate pie chart png's, but if I try to move the mouse over them, it segfaults.)

So for interactive clicking I use the Gnome Disk Analyzer / baobab which means I have to wait for analysis but I have coffee

This will sound flippant but I really don't mean it to be: what exactly does this fork give me over the old abandoned one (RIP yorhel)? I've been using ncdu forever and it kinda just works, does everything I need it to and I've never encountered a bug. And it's not like POSIX is a fast-moving platform where the tool needs to be kept up to date with new APIs

oliverpool | 3 hours ago

Yorhel did write what a rewrite would bring: https://dev.yorhel.nl/doc/ncdu2

But we're all using ncdu version 2.x written in Zig already, aren't we? My Fedora system reports having ncdu 2.11.1, and looking at the Arch Linux PKGBUILD for ncdu it's absolutely compiling a Zed project. So we're already getting the replacement that a rewrite "would bring" because Yorhel did completed the rewrite.

bityard | 3 hours ago

There's also gdu in this space. (And the bottom of their README contains many similar alternatives.)

How does this compare to https://github.com/BratishkaErik/ncdu (packaged in nixpkgs)?

[OP] rcalixte | 11 hours ago

I don't want to put down someone else's efforts or project. As I stated in another reply in this thread, there are some decisions that were made that I would not have and will not make. That this project lives on with more than one fork shows its original significance. I think that's what counts.