Open zdzichu opened 10 months ago
This seems more like a feature request, labeling accordingly.
I would like to have an option to display directories size too. Maybe it would slow down the output, I don't know..
The PR https://github.com/eza-community/eza/pull/533 added the --total-size
option, which seems to be exactly what you are looking for, so I'm gonna close this.
--total-size
is similar, but different. `--total-size
recursively looks into the directory, which 1) may be slow, potentially traversing petabytes of data; 2) may be confused if the directory contain snapshots.
What I'm asking for is different. If filesystem returns true directory size in stat()
, it should be displayed. Most filesystem return garbage as size (ext4 shows multiplies of page size, btrfs shows something related to number of entries inside the directory) but some, like cephfs, show real directory content size. Instantaneously, in bytes, without need to recursively traverse the fs.
Ah alright, I'll reopen it then, sorry for the confusion.
But probably good to have mentioned the --total-size
here anyway, as it might be sensible to add the functionality you are asking for as fast path for this argument.
If eza does something unexpected, or its output looks wrong, or it displays an error on the screen, or if it outright crashes, then please include the following information in your report:
eza --version
)If it’s a crash, please include the full text of the crash that gets printed to the screen. If you’re seeing unexpected behaviour, a screenshot of the issue will help a lot.
version: v0.11.0 [+git] cmdline: -lb platform: Linux 6.4.11 and corresponding CephFS
(this is a copy of https://github.com/ogham/exa/issues/608, because this issue is still present in
eza
)Exa is not printing directory sizes. I can understand rationale – for most filesystems directory size is rather meaningless and mostly has to do with internal fs structures. But, there are filesystems – like
cephfs
– which do have sensible idea of directory size. For cephfs, directory size corresponds to amount of data inside – you can think of it as built-in du in filesystem.For example, compare
ls -lah
output:exa -lb
output:Either switch to show directory size or whitelist of sensible filesystem would be nice to have.