Skip to content
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

feat: consider using binary size units by default #1174

Open
matklad opened this issue Oct 3, 2024 · 4 comments
Open

feat: consider using binary size units by default #1174

matklad opened this issue Oct 3, 2024 · 4 comments

Comments

@matklad
Copy link

matklad commented Oct 3, 2024

By default, eza's M is 1000KB, not 1024KiB. This probably doesn't matter for the majority of the cases, but it is extremely confusing if you do need to know precise size of the file. I can't back that up, but my gut feeling is that 9 out of 10 people upon seeing

.rwxr-xr-x@ 132M matklad 30 Sep 14:34  tigerbeetle

would interpret that as 132MiB, not as 132MB. I definitely was mightily confused over this today!

@cafkafk
Copy link
Member

cafkafk commented Oct 3, 2024

we do have the --binary flag, but we perhaps should consider using the full unit name for the default case regardless of whether or not to change it. For what it's worth, the M prefix should be 1000 units of something, so in that sense we shouldn't report M as MiB.

I wonder if the community has any input for this.

@cafkafk
Copy link
Member

cafkafk commented Oct 3, 2024

@matklad would you have been confused if we had the units MB instead of M?

@matklad
Copy link
Author

matklad commented Oct 3, 2024

I probably would have been, yeah! Until writing this issue, I actually didn't fully realize that the official SI unit abbreviation is MB and not M (it's obvious in retrospect, but I just never thought about that)

@mrmarkwell
Copy link

+1 to this being confusing. I just spent a while trying to figure out why a Google drive file that was 2.9GB suddenly became 3.1 when I downloaded it. Defaulting to the binary interpretation of file sizes seems appropriate for a tool largely used by software developers and IT folks. In any case, thanks for the great tool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants