emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#8676: closed (ls --si --human-readable, MB vs M)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#8676: closed (ls --si --human-readable, MB vs M)
Date: Tue, 13 Sep 2011 11:37:02 +0000

Your message dated Tue, 13 Sep 2011 13:04:00 +0200
with message-id <address@hidden>
and subject line Re: bug#8676: ls --si --human-readable, MB vs M
has caused the debbugs.gnu.org bug report #8676,
regarding ls --si --human-readable, MB vs M
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
8676: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8676
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: ls --si --human-readable, MB vs M Date: Mon, 16 May 2011 03:48:40 -0500 User-agent: KMail/1.12.4 (Linux/2.6.31.12-0.2-desktop; KDE/4.3.5; x86_64; ; )
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



--- End Message ---
--- Begin Message --- Subject: Re: bug#8676: ls --si --human-readable, MB vs M Date: Tue, 13 Sep 2011 13:04:00 +0200
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".


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]