by milderworkacc · 3y ago · 0 comments
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”!)
I made jsdu to get progressive (and recursive) size.
I mostly only use jsdu on a few top levels directories, and use ncdu for the rest or after the stats is cached by jsdu.
You can install jsdu with "sudo npm i -g jsdu" or run it without install with "npx jsdu"
use a cronjob for `duc index`, then you can use `duc ui` to see the index. it doesn’t immediately update on change so it’s not quite what you’re looking for, but it might be the closest thing.
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.)
Many file managers can do that, although for obvious reasons it's rather built as a contextual action on a single directory than an always on feature than would slow down the filesystem horribly by accessing it recursively on many levels. On Thunar (XFCE's file manager) for example it's accessible from the contextual menu opened using the right mouse button on a directory name; other file managers would work in a similar way.
I'm sure filesystems could be modified so that any write would automatically update a field referred by the containing directory, so it would quickly propagate to the upper level, but that would imply many more write accesses which for example on SSD media would do more harm than good.
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.