bug#32242: dd help text lacks information about binary prefixes
From:
Pádraig Brady
Subject:
bug#32242: dd help text lacks information about binary prefixes
Date:
Sat, 21 Jul 2018 12:43:12 -0700
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 21/07/18 11:48, Wodry wrote:
> One can use binary prefixes (iB, e.g. MiB) with dd command, but that is
> not written in the help text.
>
> I just found out because I wanted to add support for binary prefixes
> since I did not know they are already supported.
>
> It's a hidden, but valuable feature, since I think, that M is binary is
> hard to remember and can easily lead to confusion.
>
> Much clearer is to use MiB. "M" is mentioned only for backwards
> compatibility in this patch.
>
> The parsing for binary prefixes is done in
>
> gnulib/lib/xstrtol.c
>
> so this is not dd specific.
MiB is less ambiguous to read, though somewhat less portable.
We should update truncate(1) etc. to be consistent if making this change.
thanks,
Pádraig