Live data from Hacker News

Ncdu – NCurses Disk Usage

dev.yorhel.nl

151–160 of 168 posts

Re: Ncdu – NCurses Disk Usage

#151
post #148
post #122

One thing ncdu does not improve on over du | sort is that it still needs to scan the full directory structure before even displaying any result. I would like something that starts estimating sizes immediately, and then refines those estimations as it is able to spend more time. I tried writing it myself, but I ended up not quite knowing how to go about it, because just getting the count of files in a directory takes…

If you're okay with a GUI, I think that's how baobab works. I think it only shows the intermediate updates if the disk is slow enough, as I remember it doing that in the past, but checking my SSD just now it didn't.

I will take a look. Thanks!

Re: Ncdu – NCurses Disk Usage

#153

ncdu is fabulous. I used it a while back on my 2009 Mac mini and recovered 40GB of disk space. 8GB of this was in just four folders: ~/Library/Logs/CrashReporter/MobileDevice, /private/var/db/systemstats, /System/Library/Caches/com.apple.coresymbolicationd, and /Library/Caches/com.apple.iconservices.store.

I would advise against deleting random things on your disk that are taking up space.

Re: Ncdu – NCurses Disk Usage

#154
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…

fd instead of find (fast, good defaults) https://github.com/sharkdp/fd

Re: Ncdu – NCurses Disk Usage

#155

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…

I assume the restriction is file system related. It's probably not always cheap to calculate the full size of a directory, especially if it's heavily nested. Windows will tell you the size of a dir in the right click -> properties menu, but it takes a while to calculate for large/complicated directories.

Just lie to me a little bit. I wouldn't mind seeing quick cached approximations that assume that I have changed the disk between reboots, or recently just move huge files around (and the OS would know anyway)

Re: Ncdu – NCurses Disk Usage

#156

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…

I assume the restriction is file system related. It's probably not always cheap to calculate the full size of a directory, especially if it's heavily nested. Windows will tell you the size of a dir in the right click -> properties menu, but it takes a while to calculate for large/complicated directories.

>Windows will tell you the size of a dir in the right click -> properties menu, but it takes a while to calculate for large/complicated directories.

Caja (and probably Nautilus/other-Nautilus-based managers) does that as well. But although can show it in properties arranging by size doesn't take it in consideration. (Rather it just sorts them by number of items inside.)

Re: Ncdu – NCurses Disk Usage

#157

Earlier quoted context omitted.

I find myself using WinDirStat on Windows systems, but often use ncdu in WSL.

On Windows, you should switch to WizTree. 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 under a minute, whereas I can expect WinDirStat to take half an hour. On an SSD, WizTree only takes a couple seconds.

For all the hate NTFS gets, MFT has led to the creation to two amazing tools: Everything and WizTree. Unfortunately both proprietary although freeware.

Re: Ncdu – NCurses Disk Usage

#158

Earlier quoted context omitted.

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.

>that it only uses the snap package manager and nothing else

The first installation method it shows for Linux systems is download a statically compiled binary and it already exists on the repos of every major distro. Where the only uses snap comes from?

https://github.com/aristocratos/btop#installation

Re: Ncdu – NCurses Disk Usage

#159

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…

You fool, Dolphin's predecessor Konqueror had a directory view embedding the k4dirstat component! There you can sort by subtree percentage, subtree total (bytes) and amount of items, files, subdirs.

This broke some time in the past (KDE really jumped the shark) and is now available as stand-alone applications only: k4dirstat and filelight. The MIME type inode/directory is already associated with those, so you can run them from the context menu of a directory anywhere, including file managers.

Re: Ncdu – NCurses Disk Usage

#160
post #22

The best tool I've used on Windows for that is "Scanner" by Steffen Gerlach: http://www.steffengerlach.de/freeware/

I find myself using WinDirStat on Windows systems, but often use ncdu in WSL.

You should try Directory Report on Windows. It is faster than WinDirStat. Has more filtering and reporting than WinDirStat. Can find duplicate files too
Post reply on HN