[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dd (coreutils) 5.97 used power of 10 not 2 for calculating MB
From: |
Pádraig Brady |
Subject: |
Re: dd (coreutils) 5.97 used power of 10 not 2 for calculating MB |
Date: |
Tue, 23 Jan 2007 10:16:25 +0000 |
User-agent: |
Thunderbird 1.5.0.8 (X11/20061116) |
Paul Eggert wrote:
> "Dat Head" <address@hidden> writes:
>
>> dd if=/dev/zero of=/dev/null count=100 bs=1024k
>> 100+0 records in
>> 100+0 records out
>> 104857600 bytes (105 MB) copied, 0.00933139 seconds, 11.2 GB/s
>> ---------------------------^^^ should be 100 MB
>
> No, "MB" means megabytes (i.e., 10**6 bytes). I guess you want
> mebibytes (i.e., 2**20 bytes), but the standard abbreviation for that
> is "MiB", not "MB". See <http://physics.nist.gov/cuu/Units/binary.html>.
>
> It might be reasonable to add support for binary multiples to "dd",
> but for media the decimal numbers are probably more useful. As you
> mentioned, most media are measured in decimal multiples nowadays.
There is support for binary multiples in dd,
as I've summarized in the help output from my truncate util¹
<size> is a number which may be optionally followed
by the following multiplicative suffixes:
b 512
KB 1000
K 1024
MB 1000*1000
M 1024*1024
and so on for G, T, P, E, Z, Y
> My favorite was the old "1.44 MB" floppy, which contained 1.44 * 1024
> * 1000 bytes. Almost anything is better than that sort of confusion!
cool! You learn something new everyday.
cheers,
Pádraig.
¹ http://www.pixelbeat.org/scripts/truncate