Subject: Re: bug#7241: Possible bug on split ?
From: Jim Meyering <[email-masked]>
To: Ulf Zibis <[email-masked]>
Cc: Paul Eggert <[email-masked]>, [email-masked]
Date: Tue, 31 May 2011 23:36:15 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Ulf Zibis wrote:

>  Am 19.10.2010 21:24, schrieb Paul Eggert:
>> On 10/19/10 07:42, Ulf Zibis wrote:
>>> In many FAQs the small letter spelling is suggested, e.g.:
>>>
>>> ntfsclone -s -o -<source>  | gzip -c | split -a 3 -b 700m -<destination>
>>>
>>> So IMO small letter writing for "MB" should be allowed
>> But "mb" is SI syntax for "millibit", which
>> is a very small unit of information.  Having "mb"
>> be an alias for "megabyte" would be confusing
>> to those used to the standard notation.  (Having
>> "mb" be an alias for "megabit", or for "millibyte",
>> would be bad as well.)
>>
>> We have to support plain "m" as an alias for "MiB",
>> because POSIX requires support for plain "m".
>> But let's not compound POSIX's mistake by supporting
>> even more usages that are contrary to SI.
>
> Ok, so the docs should be better detailed.
> BTW: this problem is not restricted on the split command, it concerns
> allmost all GNU coreutils and more, e.g. ntfsprogs.

The info documentation is very specific:

`-b SIZE'
`--bytes=SIZE'
     Put SIZE bytes of INPUT into each output file.  SIZE may be, or
     may be an integer optionally followed by, one of the following
     multiplicative suffixes:
          `b'  =>            512 ("blocks")
          `KB' =>           1000 (KiloBytes)
          `K'  =>           1024 (KibiBytes)
          `MB' =>      1000*1000 (MegaBytes)
          `M'  =>      1024*1024 (MebiBytes)
          `GB' => 1000*1000*1000 (GigaBytes)
          `G'  => 1024*1024*1024 (GibiBytes)
     and so on for `T', `P', `E', `Z', and `Y'.

However, split --help is brief (and split.1 is mechanically
derived from split --help output), but that's fine, because it's
more of a quick-reference and points to the info documentation.
Note the last line:

    For complete documentation, run: info coreutils 'split invocation'

We'd welcome any specific suggestions for improvement you may have.
Note that while I'm closing this "issue", you're welcome to continue
replying, and comments will still be archived for it and read by people
on this list.