Hi,
From: man:ls
............................................................................
SIZE may be (or may be an integer optionally followed by) one of following:
kB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.
............................................................................
From: info:/coreutils/Block size
............................................................................
...
With human-readable formats, output sizes are followed by a size letter such
as `M' for megabytes. `BLOCK_SIZE=human-readable' uses powers of 1024; `M'
stands for 1,048,576 bytes. `BLOCK_SIZE=si' is similar, but uses powers of
1000 and appends `B'; `MB' stands for 1,000,000 bytes.
...
`MB'
megabyte: 10^6 = 1,000,000.
`M'
`MiB'
mebibyte: 2^20 = 1,048,576.
............................................................................
Commands:
............................................................................
#1 ls -l file.ogg
-r--r--r-- 1 user group 59802045 2010-07-01 20:37 file.ogg
#2 ls -l --si file.ogg
-r--r--r-- 1 user group 60M 2010-07-01 20:37 file.ogg
#3 ls -l --human-readable file.ogg
-r--r--r-- 1 user group 58M 2010-07-01 20:37 file.ogg
#4 ls -l --block-size=si file.ogg
-r--r--r-- 1 user group 60M 2010-07-01 20:37 file.ogg
#5 ls -l --block-size=human-readable file.ogg
r--r--r-- 1 user group 58M 2010-07-01 20:37 file.ogg
............................................................................
Given the above:
SI Decimal (Matches #2):
59802045/(1000*1000) = roundup(59.80,0) = 60 MB
IEC Binary (Matches #3):
59802045/(1024*1024) = roundup(57.03,0) = 58 M
Shouldn't the `ls -l --si` output (#2 or #4) be display as 60MB vs 60M or
am I just missing a `ls` option for formatting the different display units?
Thank you.
Peggy Russell