bug-coreutils
[Top][All Lists]
Advanced

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

bug#9939: Problems with the SIZE description in man pages for <ls> and <


From: Eric Blake
Subject: bug#9939: Problems with the SIZE description in man pages for <ls> and <du>
Date: Thu, 10 Nov 2011 14:36:48 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110928 Fedora/3.1.15-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.4 Thunderbird/3.1.15

On 11/10/2011 02:26 PM, Paul Eggert wrote:
On 11/10/11 12:33, Eric Blake wrote:
-SIZE may be (or may be an integer optionally followed by) one of following:\n\
-KB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.\n\
+SIZE may be a integer, a suffix, or both.  A valid suffix selects a power\n\
+from [KMGTPEZY], and an optional base ('' or 'iB' for 1024, 'B' for 1000).\n\

How about if we not bother to document the integerless suffix here?
Similarly, we can omit the documentation for 'iB'.
That kind of trivia can be left to the full manual, as it isn't
needed to use the program conveniently and effectively.
I realize that this'll mean that the 'ls --help' output isn't complete,
but it's already incomplete by design (it's a summary, not the full
manual), and this particular bit of incompleteness should be OK.

On the other hand, what I think is most missing here is an *example*.
An example can help communicate intent clearly and quickly
to non-experts.  I think an example would have helped Abdallah
get the point without having to ask us what the sentence means.

Given the above, how about the following rewording?

   SIZE is an integer with an optional suffix (example: 10GB).  Suffixes are:
   KB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.

Hmm, and we already have "-k like --block-size=1K", rather than "like --block-size=K", so we are already gearing users towards always providing the integer. Like you said, your wording is incomplete, but still covers the most common use cases. I can live with it.

--
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org





reply via email to

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