Live data from Hacker News

Ncdu – NCurses Disk Usage

dev.yorhel.nl

111–120 of 168 posts

Re: Ncdu – NCurses Disk Usage

#111
post #50

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

$ sudo apt install ncdu > Not enough free space Fuck! Actually, one trick I learned was to create a dummy file full of zeroes or rand, maybe 200MB or so, and place it in an obvious location (e.g /) for easy deleting in such a crisis.

Ext3/ext4 systems do this by default and reserve 5% of space for root.[0]

[0] https://docs.cloudera.com/cloudera-manager/7.4.2/managing-cl...

Re: Ncdu – NCurses Disk Usage

#112

If you use a Btrfs filesystem with snapshots, I can recommend Btdu as an alternative. Advantage: Can handle duplicate files (snapshots), which however only occupy 1x disk space. https://github.com/CyberShadow/btdu

More interesting than its support of Btrfs features is its unusual statistical approach:

> btdu is a sampling disk usage profiler […] Pick a random point on the disk then find what is located at that point […] btdu starts showing results instantly. Though wildly inaccurate at first, they become progressively more accurate the longer btdu is allowed to run.

Re: Ncdu – NCurses Disk Usage

#113
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 :)

> ponder your life choices that led to that situation.

I always remember that VMware vCenter appliance didn't come with a working logrotate config for years and feel better.

Re: Ncdu – NCurses Disk Usage

#114

Earlier quoted context omitted.

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

An annoying thing about btop is that it only uses the snap package manager and nothing else. You can still install it yourself easily but I don’t understand why they’d stick stick with snap alone.

Re: Ncdu – NCurses Disk Usage

#115
post #94

Earlier quoted context omitted.

One thing that comes to mind as someone who is not in the know of these new tools would be, are they safe? The old tools have been there forever and used everywhere. My assumption would be these are safe and don't change often. For better or for worse, I would be concerned about using the newer tools unless they are backed and/or approved by a large open source org.

I really respect this take -- and also kind of don't like it at the same time? Basically, I don't do "mission critical" Linux things. I teach IT and I hack around on my own boxes with scripts and stuff because it's fun and useful to me. I'm always on the lookout for the hooks and such that can get more and different people into Linux.

I understand. The truth can be bitter. My first instinct is to install most of these tools. Then I remember all the recent supply chain attacks and malicious packages that have been snuck into software.

I use 1 daily driver for everything, including my finances and crypto. So trust me, I'm bummed out about this. I'll still check some of these out. As long as they seem safe, I will install a few.

Re: Ncdu – NCurses Disk Usage

#116
I love ncdu and install it on all of my machines. But at the risk of sounding like a broken record - why isn’t its functionality baked into stock file managers on windows and Linux?

Why can’t either of these systems do what the Mac has been able to do since the 90s, and display the recursive size of a directory in bytes in the file manager, allowing one to sort directories by recursive size?

I am not exaggerating to say this is the single biggest roadblock to my permanent migration to Linux!

(I would love nothing more than to hear I’m wrong and “you fool, Dolphin can do that with flag: foo”!)

Re: Ncdu – NCurses Disk Usage

#118
post #21

I use ncdu almost daily across many different systems. Especially handy when running macOS on a `rmlint` and `jdupes` are also seeing a lot of use here lately, reclaiming terabytes of space from years of sloppy media organization (or the lack thereof!)

Yeah I prune stuff with ncdu weekly on my work 0.5T machine. Oddly I don’t have to use it so much on my 2T personal machine.

Re: Ncdu – NCurses Disk Usage

#119

I love ncdu and install it on all of my machines. But at the risk of sounding like a broken record - why isn’t its functionality baked into stock file managers on windows and Linux? Why can’t either of these systems do what the Mac has been able to do since the 90s, and display the recursive size of a directory in bytes in the file manager, allowing one to sort directories by recursive size? I am not exaggerating to…

ranger has this built in

Re: Ncdu – NCurses Disk Usage

#120
Fantastic tool. One improvement I'd like to see is support for .Trash instead of straight out deletion.

I had to delete a lot of stuff so I turned off the 'Are you sure?' prompt.

Sure enough, 4 minutes later I fat fingered some wanted files into oblivion.

Post reply on HN