GNU bug report logs -
#8676
ls --si --human-readable, MB vs M
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8676 in the body.
You can then email your comments to 8676 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org
:
bug#8676
; Package
coreutils
.
(Mon, 16 May 2011 16:15:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Peggy Russell <prusselltechgroup <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Mon, 16 May 2011 16:15:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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
Information forwarded
to
owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org
:
bug#8676
; Package
coreutils
.
(Mon, 16 May 2011 16:24:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 8676 <at> debbugs.gnu.org (full text, mbox):
On 05/16/11 01:48, Peggy Russell wrote:
> Shouldn't the `ls -l --si` output (#2 or #4) be display as 60MB vs 60M
That would be more consistent, yes. But it would also take up an extra
column of output, and those columns are precious.
Reply sent
to
Jim Meyering <jim <at> meyering.net>
:
You have taken responsibility.
(Tue, 13 Sep 2011 11:37:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Peggy Russell <prusselltechgroup <at> gmail.com>
:
bug acknowledged by developer.
(Tue, 13 Sep 2011 11:37:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 8676-done <at> debbugs.gnu.org (full text, mbox):
tags 8676 + notabug
thanks
Paul Eggert wrote:
> On 05/16/11 01:48, Peggy Russell wrote:
>> Shouldn't the `ls -l --si` output (#2 or #4) be display as 60MB vs 60M
>
> That would be more consistent, yes. But it would also take up an extra
> column of output, and those columns are precious.
Just marking this issue as "done".
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 12 Oct 2011 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 13 years and 304 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.