ogham/exa

Sum file sizes into parent directory

nothingmuch opened this issue · 10 comments

It'd be nice to have summation of file sizes (like du -s) for the directories in the --tree or --recursive view.

it'd also be nice to be able to force it to recurse, even when -L is set (to list a few levels of the tree, but still have directory sizes)

Would like to know if this will be implemented

ogham commented

@ralpheeee88: I’m sorry, exa’s code isn’t really set up to handle this case right now. It assumes that if you’re recursing into a directory, it should print out a list of files inside — there’s no way to print out some files but sum the sizes of others.

I’d like to have it as a feature, which is why I’m leaving this issue open, but I’m not going to put a milestone on it yet.

@ogham no worries.... it's such a great tool as is... Leave it on the back burner with a low priority... Thxs for getting back..!!

This would be an awesome feature to have :)

From your comments on the other two closed issues, your reason to not implement it is because it'd require 2 passes instead of a single one? Is that just a performance/speed issue mostly? If exa can support the feature by just doing an extra pass and implementing the feature to do this isn't too much trouble.. perhaps it could be offered like that in the interim?

At a later date if you wanted to handle it better with a refactor to avoid the extra pass, then it's a nice speedup, as exa is touted for already being pretty fast, is an extra pass for now for a feature like this a perceivable problem? I'm fine with du -sh, though it seems a good fit for what exa does.

I found this application (DU- alternative):
And its written in RUST. I haven't been exposed to RUST much so i don't know if i can use the code from this project into EXA. Maybe there should be just a flag, and when the flag is on, the EXA goes into DU mode, so its fast and untouched without, and a bit slower with du-mode.

IMAGE

https://github.com/nachoparker/dutree

I am also interested in this feature. Just to let you know. 👍

Id like to have this too

ogham commented

(I'm going through all the old issues)

It's still the case that exa's code isn't set up to support this now, and I still want to support this feature so I'm leaving the issue open.

  • Are you planning to support #715, too?
  • I’m pretty sure this feature is incompatible with #82.

May be relevant: we can brew install dua and forget about the old du