-
-
Notifications
You must be signed in to change notification settings - Fork 661
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to Show Recursive Size of Directories? #1025
Comments
@Amarakon55 the case could be made then that exa would not be a drop-in replacement for ls if it does that work Btw - this isn't the way a lot of operating systems behave out-of-the-box There's a speed tradeoff as that would take the program time to add all the file sizes up in the directory trees under the current directory (as Linux / Debian systems don't do this by default - a gripe really for Linus Torvalds or the Canonical team) Maybe someone can develop it as a flag option, as in "--show-directory-sizes"? |
Yes, it would be better if it wasn't the default behavior, but a flag option instead for those who want it. |
the other day I tested a whole slew of |
Given that Exa already knows which nodes are directories and already knows the size content of files in those directories, I have trouble with the notion that simply summing all of the size values nested below a particular directory would be more than trivial. |
It’s easy to think something is trivial when you don’t know the code. Exa doesn’t know the size of the files in the directories below, except when using recursive modes (like So sure, additions are simple. But the change in question needs a lot of steps and require attention to a lot details that makes it complex. |
@ariasuni my apologies for the dismissive comment. You raise some excellent points, which I had not adequately considered. Perhaps some day an additional feature can be implemented, that is specifically built to analyze disk usage, starting at the PWD. |
Thanks. Well new features can certainly be implemented and I plan to continue working on exa but I just don’t have enough time™ to make progress at a pace that satisfies people (and I understand that, but it’s frustrating for me as well and I can’t do much more than what I’m actually doing). I’m not sure about this feature, especially the ratio asked for vs needed work, but I guess it could be done. Right now my main focus is merging some old PRs, improving the CI to not break things when merging big/ambitious changes, and triaging/answering the issues (actually most of my work is this latest one). |
I currently use some aliases in my .zshrc file:
produces output like this: I would absolutely love an extra option flag (non default behavior) that allows it to display the size of the contents of the directories, even if it meant it took a little longer to do the work and display. Based on the other comments here I installed
which produced the output: |
My solution is not exa/eza either, \tree -h --du --dirsfirst -L 2
[137K] .
├── [ 12K] logging-services
│ ├── [4.0K] alloy
│ └── [4.0K] loki
├── [ 37K] monitoring
│ ├── [4.0K] alloy
│ ├── [4.0K] blackbox-exporter
│ ├── [4.0K] loki
│ ├── [4.0K] mimir
│ ├── [4.0K] prometheus
│ ├── [4.0K] promtail
│ ├── [4.0K] snmp_exporter
│ ├── [4.0K] uptimekuma
│ └── [ 797] snmp-notes.txt
├── [ 12K] proxy-services
│ ├── [4.0K] authentik
│ └── [4.0K] traefik
├── [ 36K] services
│ ├── [4.0K] cloudflared
│ ├── [4.0K] filebrowser
│ ├── [4.0K] homepage
│ ├── [4.0K] homepage-cf
│ ├── [4.0K] homer
│ ├── [4.0K] homer-cf
│ ├── [4.0K] pihole
│ └── [4.0K] uptime-kuma
├── [ 36K] stacks
│ ├── [4.0K] monitoring
│ ├── [4.0K] services-authentication
│ ├── [4.0K] services-dashboards
│ ├── [4.0K] services-docker
│ ├── [4.0K] services-file
│ ├── [4.0K] services-logging
│ ├── [4.0K] services-network
│ └── [4.0K] services-proxy
└── [ 79] README.md |
When using '-l', exa only shows the size of files. It doesn't show the size of directories. I want it to show the size of the directories including the size of everything inside the directory (recursive) similar to the '--total-size' option in lsd which is a different alternative to ls.
The text was updated successfully, but these errors were encountered: