eza-community / eza

A modern, maintained replacement for ls
https://eza.rocks
MIT License
8.76k stars 171 forks source link

bug: Different file sizes are shown by eza and ls commands #1004

Closed MuradBozik closed 1 month ago

MuradBozik commented 1 month ago

I couldn't understand why sizes shown by eza and ls commands are different.

$ eza -Slh
Permissions Size Blocksize User  Date Modified Name
.rw-r--r--  4.6G      4.6G user  23 May 22:01  file_1.tar.gz
.rw-r--r--  756M      756M user  23 May 22:15  file_2.tar.gz
.rw-r--r--  9.8G      9.8G user  23 May 22:13  file_3.tar.gz
.rw-r--r--  4.5G      4.5G user  23 May 22:27  file_4.tar.gz
.rw-r--r--  4.8G      4.8G user  23 May 22:23  file_5.tar.gz
.rw-r--r--  6.7G      6.7G user  23 May 22:51  file_6.tar.gz
$ ls -slh
total 29G
4.3G  -rw-r--r-- 1 user user  4.3G May 23 22:01 file_1.tar.gz
721M  -rw-r--r-- 1 user user  721M May 23 22:15 file_2.tar.gz
9.1G  -rw-r--r-- 1 user user  9.1G May 23 22:13 file_3.tar.gz
4.3G  -rw-r--r-- 1 user user  4.3G May 23 22:27 file_4.tar.gz
4.5G  -rw-r--r-- 1 user user  4.5G May 23 22:23 file_5.tar.gz
6.3G  -rw-r--r-- 1 user user  6.3G May 23 22:51 file_6.tar.gz
eza --version
eza - A modern, maintained replacement for ls
v0.18.16 [+git]
https://github.com/eza-community/eza

Same issue on two machines (eza versions are same):

daviessm commented 1 month ago

By default eza uses SI units for sizes, use the --bytes (-b) option for binary units.