Live data from Hacker News

Ncdu – NCurses Disk Usage

dev.yorhel.nl

81–90 of 168 posts

Re: Ncdu – NCurses Disk Usage

#81
post #55

Broadly, is anyone aware of a generalized list of "new versions of classic tools?" There are so many now that are better than the old stuff; I almost feel like a unified round up of these, maybe even in a distro form, might be good for linux enthusiasts, newcomers, old-timers, etc.

Zellij instead of tmux (not necessarily better, but it's easier to use) Xonsh instead of bash (because you already know Python, why learn a new horrible language?) bat instead of cat (syntax highlights and other nice things) exa instead of ls (just nicer) neovim instead of vim (just better) helix instead of neovim (just tested it, seems promising though) nix instead of your normal package manager (it works on Mac, an…

ranger and vifm instead of midnight commander (vim key bindings)

lsd instead of exa (better formatting, icons)

mosh instead of ssh for interactive sessions (maintains session even with bad connectivity)

hyprland instead of sway instead of i3 instead of XMonad

Re: Ncdu – NCurses Disk Usage

#82
post #18

Interesting. I’ve just used df-m | sort -n and walked the tree from the CLI for so long. I’ve also used windirstat (I think that’s what it was called) years ago on Windows and Disk Inventory X on MacOS graphically. This seems like a nice in between that could replace both methods for me. I’ll have to try. The GUI bunch of squares is really only useful when you can hover with a mouse and would be clunky in a TUI even…

You mean `du` right?

Yes, just dumb fingers typing the comment. :(

Re: Ncdu – NCurses Disk Usage

#83
post #19
post #18

Interesting. I’ve just used df-m | sort -n and walked the tree from the CLI for so long. I’ve also used windirstat (I think that’s what it was called) years ago on Windows and Disk Inventory X on MacOS graphically. This seems like a nice in between that could replace both methods for me. I’ll have to try. The GUI bunch of squares is really only useful when you can hover with a mouse and would be clunky in a TUI even…

FYI I recently discovered sort —-human is a thing so you can keep the K/M/G units if you want to. However I use ncdu all the time.

Yeah, my habits come from using GNU, BSD, SysV and having to use the lowest common denominator.

Re: Ncdu – NCurses Disk Usage

#84
post #55

Broadly, is anyone aware of a generalized list of "new versions of classic tools?" There are so many now that are better than the old stuff; I almost feel like a unified round up of these, maybe even in a distro form, might be good for linux enthusiasts, newcomers, old-timers, etc.

If you are just looking for the largest files in a directory hierarchy, try this:

  find . -type f -print0 | xargs -0 ls -s | sort -n
If your find/xargs don't support null delimiters, then the guy who wrote musl has some tricks:

http://www.etalabs.net/sh_tricks.html

Re: Ncdu – NCurses Disk Usage

#85
post #55

Broadly, is anyone aware of a generalized list of "new versions of classic tools?" There are so many now that are better than the old stuff; I almost feel like a unified round up of these, maybe even in a distro form, might be good for linux enthusiasts, newcomers, old-timers, etc.

Zellij instead of tmux (not necessarily better, but it's easier to use) Xonsh instead of bash (because you already know Python, why learn a new horrible language?) bat instead of cat (syntax highlights and other nice things) exa instead of ls (just nicer) neovim instead of vim (just better) helix instead of neovim (just tested it, seems promising though) nix instead of your normal package manager (it works on Mac, an…

btop instead of htop instead of top

Re: Ncdu – NCurses Disk Usage

#86
post #44

While ncdu does the job I've found gdu (similar tool written in Go) significantly faster for larger directories. https://github.com/dundee/gdu

Someone's gotta write rdu.

OP’s link has a list at the bottom with alternatives (that in itself is very cool). It lists both gdu and a Rust alternative called dua.

Re: Ncdu – NCurses Disk Usage

#88
post #18

Interesting. I’ve just used df-m | sort -n and walked the tree from the CLI for so long. I’ve also used windirstat (I think that’s what it was called) years ago on Windows and Disk Inventory X on MacOS graphically. This seems like a nice in between that could replace both methods for me. I’ll have to try. The GUI bunch of squares is really only useful when you can hover with a mouse and would be clunky in a TUI even…

> I’ve also used windirstat (I think that’s what it was called) years ago on Windows and Disk Inventory X on MacOS graphically. On Windows, the new hotness is WizTree, which rather than recursively calling directory listing functions, it directly reads and parses the file tables itself. This makes it orders of magnitude faster. I have a 2 TB hard drive full of a million files, and WizTree reads and parses it all in u…

That's pretty brilliant.

My windows experience is really out of date. I knew NT4 and 2000 the best. Then I picked up 2008 for a while supporting small businesses. I don't hate it or anything, but am definitely deeper on Unixes and about equal on VMS that I supported as my NT4/2000 time. I'll work on whatever pays :).

Re: Ncdu – NCurses Disk Usage

#89
post #9

Such a great tool. Thank you! On a Mac, I've been using OmniDiskSweeper for years, but this can be run in a single directory and on my Linux machines as well. Fantastic! And look, it didn't ask me to sign up for an account, and it didn't require me to consent to usage data collection with a huge Privacy Policy attached! How is that possible? (still dealing with this morning's scars from trying, and failing to run the…

now if it was just an executable file and didn't require a package manager or compiling to install it would be flawless.

Re: Ncdu – NCurses Disk Usage

#90
post #50

The trick with ncdu is to install it BEFORE your disk gets full from some random error log going haywire.

Another trick is to have a 1GB file called DeleteMeWhenDiskIsFull.

Then you can delete that file and ponder your life choices that led to that situation.

Just remember to create it again :)

Post reply on HN