this post was submitted on 07 Apr 2024
35 points (100.0% liked)

commandline

1971 readers
1 users here now

founded 2 years ago
MODERATORS
 

I just noticed that eza can now display total disk space used by directories!

I think this is pretty cool. I wanted it for a long time.

There are other ways to get the information of course. But having it integrated with all the other options for listing directories is fab. eza has features like --git-awareness, --tree display, clickable --hyperlink, filetype --icons and other display, permissions, dates, ownerships, and other stuff. being able to mash everything together in any arbitrary way which is useful is handy. And of course you can --sort=size

docs:

  --total-size               show the size of a directory as the size of all
                             files and directories inside (unix only)

It also (optionally) color codes the information. Values measures in kb, mb, and gb are clear. Here is a screenshot to show that:

eza --long -h --total-size --sort=oldest --no-permissions --no-user

Of course it take a little while to load large directories so you will not want to use by default.

Looks like it was first implemented Oct 2023 with some fixes since then. (Changelog). PR #533 - feat: added recursive directory parser with `--total-size` flag by Xemptuous

top 7 comments
sorted by: hot top controversial new old
[–] [email protected] 13 points 1 year ago (2 children)

ls does 90% of this stuff already, so why not just add the options to it?

looks at readme

eza: A modern, maintained replacement for ls.

ls is maintained so what do they mean? "Modern"?

looks at code tab

Oh! It's another person thinking the world needs to be written in Rust.

[–] [email protected] 21 points 1 year ago

why not just add the options to it?

If you are asking me, personally, it's because making any contributions to ls is far beyond my capacities and will remain that way for the forseeable future.

Personal deficiencies aside, would it even be a good idea to modify ls in this way? It seems to me that stability and predictability is a feature, not a bug. Basically you know how ls will work on every linux system. Adding all these features would turn it into something else and potentially introduce chaos. ls is tested on >millions of systems in every context; a known quantity. A feature set which is limited to the necessities avoids introducing bugs, flaws, security issues etc.

And once added, a feature probably shouldn't be removed. In 2024 I love having git status optionally integrated into my ls-type tool. But in 2034 will git still be as ubiquitous? What about 2054? ls is for the ages. eza is for right now.

[–] [email protected] 8 points 1 year ago* (last edited 1 year ago)

It also add in support for file/directory icons, git support and a few other things ls itself wouldnt add themself.

[–] [email protected] 5 points 1 year ago (1 children)
[–] [email protected] 10 points 1 year ago (1 children)

the creator of exa wasn't rechable for year and the true maintainer that made all the commits in exa decided to fork so he could add others maintainers

[–] [email protected] 4 points 1 year ago

yeah the title says "formerly exa", so I thought they just changed the name

[–] [email protected] 3 points 1 year ago

Beautiful, thank you 👍

Anti Commercial AI thingyCC BY-NC-SA 4.0