From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 02 09:15:30 2014 Received: (at submit) by debbugs.gnu.org; 2 Mar 2014 14:15:30 +0000 Received: from localhost ([127.0.0.1]:47602 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WK7Av-0001xY-0O for submit@debbugs.gnu.org; Sun, 02 Mar 2014 09:15:30 -0500 Received: from eggs.gnu.org ([208.118.235.92]:42684) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WK5b7-0007lZ-An for submit@debbugs.gnu.org; Sun, 02 Mar 2014 07:34:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WK5b1-0005WZ-Rd for submit@debbugs.gnu.org; Sun, 02 Mar 2014 07:34:25 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:44200) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WK5b1-0005WV-ON for submit@debbugs.gnu.org; Sun, 02 Mar 2014 07:34:19 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44399) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WK5aw-0000yF-QL for bug-coreutils@gnu.org; Sun, 02 Mar 2014 07:34:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WK5ar-0005VA-HO for bug-coreutils@gnu.org; Sun, 02 Mar 2014 07:34:14 -0500 Received: from moh1-ve3.go2.pl ([193.17.41.134]:52007) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WK5ar-0005U5-AZ for bug-coreutils@gnu.org; Sun, 02 Mar 2014 07:34:09 -0500 Received: from moh1-ve3.go2.pl (unknown [10.0.0.134]) by moh1-ve3.go2.pl (Postfix) with ESMTP id BE679664B23 for ; Sun, 2 Mar 2014 13:33:56 +0100 (CET) Received: from unknown (unknown [10.0.0.74]) by moh1-ve3.go2.pl (Postfix) with SMTP for ; Sun, 2 Mar 2014 13:33:55 +0100 (CET) Received: from duy156.neoplus.adsl.tpnet.pl [83.22.32.156] by poczta.o2.pl with ESMTP id fYXKpQ; Sun, 02 Mar 2014 13:33:52 +0100 Message-ID: <5313252F.1040403@o2.pl> Date: Sun, 02 Mar 2014 13:33:51 +0100 From: =?UTF-8?B?TWF0ZXVzeiBKb8WEY3p5aw==?= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: bug-coreutils@gnu.org Subject: df --si -h should emit a warning X-Enigmail-Version: 1.5.2 OpenPGP: id=2C64C488 Content-Type: text/plain; charset=UTF-8 X-O2-Trust: 2, 63 X-O2-SPF: notchecked Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 02 Mar 2014 09:15:27 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, There should be a warning when running df --si -h because it will display= results in blocks of 1024 and not 1000, as one might think (the switch --si displ= ays blocks in a human-readable format when used by itself). Greetings, Mateusz Jo=C5=84czyk -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: My public key: 0x2C64C488 on hkp://pool.sks-keyservers.net Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJTEyUvAAoJELLT9LcsZMSIbUAH/jqzwjVoHp3w6ud2cKnMw85x J2MIPVXIUSHuVFL+0bMtiT8LqsLRJ4/FZtLr9GlNeNljuJ/cAclkUzFJXuuUO0Ci feNPI1udsOslkvw8P1n6ghi1VaJOHy2qt9DegjDQOHhNNZRbMD7AYQBxneZ/VBbd shptJoeqxg4GEQIXIZZN4rLQ5DKixIHoDPl/rrgxELIvepZY1MX5LK88w+ktagcA Q0St5XmhYH4aTb5DhSuBRMeLWopTYfi2tEGUqKMD95IZ530YpL6W4DCWVh9N9wqI enXxbIz+++YYCfjapzLihcSu30No6764nEruHWH6UsqGaJ8E/ClXUHSfqMfkoDI=3D =3D78fV -----END PGP SIGNATURE----- From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 02 09:34:19 2014 Received: (at 16922) by debbugs.gnu.org; 2 Mar 2014 14:34:19 +0000 Received: from localhost ([127.0.0.1]:47617 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WK7T8-0002QT-7X for submit@debbugs.gnu.org; Sun, 02 Mar 2014 09:34:18 -0500 Received: from mail1.vodafone.ie ([213.233.128.43]:26916) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WK7Sz-0002QE-Gz for 16922@debbugs.gnu.org; Sun, 02 Mar 2014 09:34:10 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApQBAOtAE1NtTsCf/2dsb2JhbAANTYcbuxKDDIEogxkBAQEEIw8BRhALDQsCAgUWCwICCQMCAQIBRQYNAQcBAYd6qjJ2oDMXgSmMYk4Hgm+BSQEDny6OZg Received: from unknown (HELO [192.168.1.79]) ([109.78.192.159]) by mail1.vodafone.ie with ESMTP; 02 Mar 2014 14:34:08 +0000 Message-ID: <5313414F.1070607@draigBrady.com> Date: Sun, 02 Mar 2014 14:33:51 +0000 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: =?UTF-8?B?TWF0ZXVzeiBKb8WEY3p5aw==?= Subject: Re: bug#16922: df --si -h should emit a warning References: <5313252F.1040403@o2.pl> In-Reply-To: <5313252F.1040403@o2.pl> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 16922 Cc: 16922@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On 03/02/2014 12:33 PM, Mateusz Jończyk wrote: > Hello, > There should be a warning when running df --si -h because it will display results > in blocks of 1024 and not 1000, as one might think (the switch --si displays blocks > in a human-readable format when used by itself). This is confusing. I think the confusion stems from the option names themselves. I.E. I'm not sure you'd want to warn as you might want to support overriding options. Consider: alias df='df -h' Then you could very well want to `df -H` to override the power from 1024 to 1000. So really the option should be --human-si not just --si. Also I notice that in GNU df, -h and -H are 1024 and 1000 based respectively, whereas on FreeBSD it's the other way around :( How about we just support --human-si and deprecate --si ? thanks, Pádraig. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 02 12:38:12 2014 Received: (at 16922) by debbugs.gnu.org; 2 Mar 2014 17:38:12 +0000 Received: from localhost ([127.0.0.1]:48107 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKAL6-0007EO-7w for submit@debbugs.gnu.org; Sun, 02 Mar 2014 12:38:12 -0500 Received: from moutng.kundenserver.de ([212.227.17.13]:57819) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKAL2-0007EE-VR for 16922@debbugs.gnu.org; Sun, 02 Mar 2014 12:38:09 -0500 Received: from [192.168.1.11] (p57A5D1AD.dip0.t-ipconnect.de [87.165.209.173]) by mrelayeu.kundenserver.de (node=mreue104) with ESMTP (Nemesis) id 0Lm4GH-1WtEAp41An-00Ziue; Sun, 02 Mar 2014 18:38:07 +0100 Message-ID: <53136C7E.6000408@bernhard-voelker.de> Date: Sun, 02 Mar 2014 18:38:06 +0100 From: Bernhard Voelker User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= , =?UTF-8?B?TWF0ZXU=?= =?UTF-8?B?c3ogSm/FhGN6eWs=?= Subject: Re: bug#16922: df --si -h should emit a warning References: <5313252F.1040403@o2.pl> <5313414F.1070607@draigBrady.com> In-Reply-To: <5313414F.1070607@draigBrady.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Provags-ID: V02:K0:+fLVV7ya0c7lwqt8VNwN0D7ZjeGuwBx1WDXbdlmeLvS bmlVLLCTn9fVHf1F8k7gNuMPLdYEHP3Uc5TTeDbx1V5L4+VMHz U6l/xNhBXSSr6ycwjcB/7gBNwSR1o1Awg7ZhcKa+DIFjwyVNBs EafDtihRhLwPrdkMl8CM9WawUypbRoh2EkMwyKwPHaDRqmTP3Z sym/A/T5mrvKCQERRCYJz0rHY3PxvYgTkk5+D7gJ0662aN/ey6 CCKA+uSoWwX7coCluadlOrZoYoBbJg+m76gNFQSNqGj0nlmAkg EgFzO19pZ74DwdIuncYCbCOk5JZrI67VRkTknnI9GbNBZsttnq k5shZar6XEvJG9GgPsf+U8CstmAUgwCiJ2PQ4kxwB X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 16922 Cc: 16922@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On 03/02/2014 03:33 PM, Pádraig Brady wrote: > On 03/02/2014 12:33 PM, Mateusz Jończyk wrote: >> Hello, >> There should be a warning when running df --si -h because it will display results >> in blocks of 1024 and not 1000, as one might think (the switch --si displays blocks >> in a human-readable format when used by itself). > > This is confusing. Indeed, or not ... > I think the confusion stems from the option names themselves. > I.E. I'm not sure you'd want to warn as you might want to support overriding options. > Consider: alias df='df -h' > > Then you could very well want to `df -H` to override the power from 1024 to 1000. ... because df really honors the last given option (as expected): $ src/df -h / | sed 1d /dev/sdb2 20G 8.7G 10G 47% / $ src/df -H / | sed 1d /dev/sdb2 22G 9.3G 11G 47% / $ src/df -h -H / | sed 1d /dev/sdb2 22G 9.3G 11G 47% / $ src/df -H -h / | sed 1d /dev/sdb2 20G 8.7G 10G 47% / > So really the option should be --human-si not just --si. Well, I'm 80:20 against this. Df(1) just honors the latest option given - no matter what the name of the option's name is. Renaming an option is almost always a "suboptimal" thing for users. In this case, some might be already used to type "df --human" which would not be distinguishable from --human-si anymore. The problem is maybe that "df --help" doesn't explicitly say that -h is using powers of 1024 no matter what other option was given before. -h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G) -H, --si likewise, but use powers of 1000 not 1024 However, the info page is quite clear about this: `-h' `--human-readable' Append a size letter to each size, such as `M' for mebibytes. Powers of 1024 are used, not 1000; `M' stands for 1,048,576 bytes. This option is equivalent to `--block-size=human-readable'. Use the `--si' option if you prefer powers of 1000. > Also I notice that in GNU df, -h and -H are 1024 and 1000 based respectively, > whereas on FreeBSD it's the other way around :( Outch. ;-( Have a nice day, Berny From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 02 13:08:00 2014 Received: (at 16922) by debbugs.gnu.org; 2 Mar 2014 18:08:00 +0000 Received: from localhost ([127.0.0.1]:48120 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKAnv-0007xk-4C for submit@debbugs.gnu.org; Sun, 02 Mar 2014 13:07:59 -0500 Received: from moh3-ve2.go2.pl ([193.17.41.86]:32920 helo=moh3-ve1.go2.pl) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKAnr-0007xa-Qw for 16922@debbugs.gnu.org; Sun, 02 Mar 2014 13:07:57 -0500 Received: from moh3-ve1.go2.pl (unknown [10.0.0.157]) by moh3-ve1.go2.pl (Postfix) with ESMTP id CA8BDAF6975 for <16922@debbugs.gnu.org>; Sun, 2 Mar 2014 19:07:53 +0100 (CET) Received: from unknown (unknown [10.0.0.74]) by moh3-ve1.go2.pl (Postfix) with SMTP for <16922@debbugs.gnu.org>; Sun, 2 Mar 2014 19:07:53 +0100 (CET) Received: from aarw99.neoplus.adsl.tpnet.pl [83.5.208.99] by poczta.o2.pl with ESMTP id IWdWdK; Sun, 02 Mar 2014 19:07:53 +0100 Message-ID: <53137378.7060504@o2.pl> Date: Sun, 02 Mar 2014 19:07:52 +0100 From: =?UTF-8?B?TWF0ZXVzeiBKb8WEY3p5aw==?= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= Subject: Re: bug#16922: df --si -h should emit a warning References: <5313252F.1040403@o2.pl> <5313414F.1070607@draigBrady.com> In-Reply-To: <5313414F.1070607@draigBrady.com> X-Enigmail-Version: 1.5.2 OpenPGP: id=2C64C488 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-O2-Trust: 2, 64 X-O2-SPF: notchecked X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 16922 Cc: 16922@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 W dniu 02.03.2014 15:33, Pádraig Brady pisze: > On 03/02/2014 12:33 PM, Mateusz Jończyk wrote: >> Hello, There should be a warning when running df --si -h because it will >> display results in blocks of 1024 and not 1000, as one might think (the >> switch --si displays blocks in a human-readable format when used by itself). > > This is confusing. > > I think the confusion stems from the option names themselves. I.E. I'm not sure > you'd want to warn as you might want to support overriding options. Consider: > alias df='df -h' > > Then you could very well want to `df -H` to override the power from 1024 to > 1000. > > So really the option should be --human-si not just --si. > > Also I notice that in GNU df, -h and -H are 1024 and 1000 based respectively, > whereas on FreeBSD it's the other way around :( > > How about we just support --human-si and deprecate --si ? There should probably be a warning in the documentation at --si. I do not know what to think about the --human-si switch. > > thanks, Pádraig. > - -- Pozdrawiam, Mateusz Jończyk AEI, Informatyka, Semestr 2 Magisterskich, BDiIS -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: My public key: 0x2C64C488 on hkp://pool.sks-keyservers.net Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJTE3N3AAoJELLT9LcsZMSIX90H/AkPy6z8MSDtKIi6JmkkABjI k6ed81SO2H33XAU5agyGjxqlWvrKfo2Bl0Kxk0AJtoeTN74ENKTJvEmLDcnSJu48 90g4+91zRqv0+v+39OVqSrXK0kf2Sj+9Tg893Mw+tUsKHHEU3I82v9aTpHI8pFlY 4zHul7a+3GToD7EQbLX3ZPz15ehNJM9cLsrCKLsIoUBHQxhMXToL7ixhfm9D8PCY moa3+mKg0T2zXGnTMjrHQs7YdBE95FI1MtA4upTXqJFIeyb0JhX5jUSX4HDbL6Ll ln8iOQvU8cqv2Msa3qc2LcM939R8A32WChbP9L4gojpnGXB0NpX3reb6qcrm8/4= =x3bk -----END PGP SIGNATURE----- From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 02 13:13:57 2014 Received: (at 16922) by debbugs.gnu.org; 2 Mar 2014 18:13:57 +0000 Received: from localhost ([127.0.0.1]:48124 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKAtg-00086e-Jc for submit@debbugs.gnu.org; Sun, 02 Mar 2014 13:13:57 -0500 Received: from moh3-ve3.go2.pl ([193.17.41.87]:52657) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKAte-00086T-IN for 16922@debbugs.gnu.org; Sun, 02 Mar 2014 13:13:55 -0500 Received: from moh3-ve3.go2.pl (unknown [10.0.0.158]) by moh3-ve3.go2.pl (Postfix) with ESMTP id 94985B5A721 for <16922@debbugs.gnu.org>; Sun, 2 Mar 2014 19:13:53 +0100 (CET) Received: from unknown (unknown [10.0.0.74]) by moh3-ve3.go2.pl (Postfix) with SMTP for <16922@debbugs.gnu.org>; Sun, 2 Mar 2014 19:13:53 +0100 (CET) Received: from aarw99.neoplus.adsl.tpnet.pl [83.5.208.99] by poczta.o2.pl with ESMTP id XKvUdt; Sun, 02 Mar 2014 19:13:52 +0100 Message-ID: <531374E0.8030008@o2.pl> Date: Sun, 02 Mar 2014 19:13:52 +0100 From: =?UTF-8?B?TWF0ZXVzeiBKb8WEY3p5aw==?= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Bernhard Voelker , =?UTF-8?B?UMOhZHJhaWcgQnI=?= =?UTF-8?B?YWR5?= Subject: Re: bug#16922: df --si -h should emit a warning References: <5313252F.1040403@o2.pl> <5313414F.1070607@draigBrady.com> <53136C7E.6000408@bernhard-voelker.de> In-Reply-To: <53136C7E.6000408@bernhard-voelker.de> X-Enigmail-Version: 1.5.2 OpenPGP: id=2C64C488 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-O2-Trust: 2, 66 X-O2-SPF: notchecked X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 16922 Cc: 16922@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 W dniu 02.03.2014 18:38, Bernhard Voelker pisze: > The problem is maybe that "df --help" doesn't explicitly say that -h is using > powers of 1024 no matter what other option was given before. > > -h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G) > -H, --si likewise, but use powers of 1000 not 1024 > > However, the info page is quite clear about this: > > `-h' `--human-readable' Append a size letter to each size, such as `M' for > mebibytes. Powers of 1024 are used, not 1000; `M' stands for 1,048,576 bytes. > This option is equivalent to `--block-size=human-readable'. Use the `--si' > option if you prefer powers of 1000. > I did not read the full man page description, just found the header '--si' and thought that it does just what the name says: switches the display powers from 1024 to 1000. It should probably be described earlier in the manpage. - -- Pozdrawiam, Mateusz Jończyk AEI, Informatyka, Semestr 2 Magisterskich, BDiIS -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: My public key: 0x2C64C488 on hkp://pool.sks-keyservers.net Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJTE3TfAAoJELLT9LcsZMSIolUH/jHyBgsBerTkkD1UF+HVGlpH sAp/H3lS3syzpTVjOMrCmW6WtYAWWzpVbLXmHM4YLSX1U/kzE9RibfJ5inH+ZInT Stllsi3Dkh0ACyPBQCEcAsILMzEnV+5Sxo+Qc9JP+PAQetQ1IbuFRRuPfh2TfFz7 1jUWWWeUDy20S7uUMb4Xew201VLdm4si+aaTn0dJV9Wl8pSC/ldbF6MOiYypJZji D6obMcyzcofWNY2sNi2Jz9lxNBHGW7jG2Z0k4PUigGY4gLdG1aUfOzVc6n5DkT0x A4hJzl1oIlvtr9RAVmrt7U7QA2oHgVmGzkuLEWSdgRoCh4ZGKAbqRyxHWSOu4d0= =cwS7 -----END PGP SIGNATURE----- From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 02 22:02:44 2014 Received: (at 16922-done) by debbugs.gnu.org; 3 Mar 2014 03:02:44 +0000 Received: from localhost ([127.0.0.1]:48320 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKJ9Q-0005wT-2B for submit@debbugs.gnu.org; Sun, 02 Mar 2014 22:02:44 -0500 Received: from mail1.vodafone.ie ([213.233.128.43]:9301) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKJ9M-0005wG-MQ for 16922-done@debbugs.gnu.org; Sun, 02 Mar 2014 22:02:42 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqIBAC/wE1NtTsCf/2dsb2JhbAANTINBUYMJhV23bYExgxkBAQEDASNWBQsLDQEDAwECAQkUAgsCAgkDAgECAT0IBg0BBQIBAYdtDQOqWHagNheOCz0MBQeCb4FJBJBIgTSHcoVAhXSIcg Received: from unknown (HELO [192.168.1.79]) ([109.78.192.159]) by mail1.vodafone.ie with ESMTP; 03 Mar 2014 03:02:38 +0000 Message-ID: <5313F0CE.5080201@draigBrady.com> Date: Mon, 03 Mar 2014 03:02:38 +0000 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Bernhard Voelker Subject: Re: bug#16922: df --si -h should emit a warning References: <5313252F.1040403@o2.pl> <5313414F.1070607@draigBrady.com> <53136C7E.6000408@bernhard-voelker.de> In-Reply-To: <53136C7E.6000408@bernhard-voelker.de> X-Enigmail-Version: 1.6 Content-Type: multipart/mixed; boundary="------------000205000309000101080202" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 16922-done Cc: =?UTF-8?B?TWF0ZXVzeiBKb8WEY3p5aw==?= , 16922-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) This is a multi-part message in MIME format. --------------000205000309000101080202 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 03/02/2014 05:38 PM, Bernhard Voelker wrote: > On 03/02/2014 03:33 PM, Pádraig Brady wrote: >> On 03/02/2014 12:33 PM, Mateusz Jończyk wrote: >>> Hello, >>> There should be a warning when running df --si -h because it will display results >>> in blocks of 1024 and not 1000, as one might think (the switch --si displays blocks >>> in a human-readable format when used by itself). >> >> This is confusing. > > Indeed, or not ... > >> I think the confusion stems from the option names themselves. >> I.E. I'm not sure you'd want to warn as you might want to support overriding options. >> Consider: alias df='df -h' >> >> Then you could very well want to `df -H` to override the power from 1024 to 1000. > > ... because df really honors the last given option (as expected): Yep that's my point. I.E. we should probably not issue a warning in this case. >> So really the option should be --human-si not just --si. > > Well, I'm 80:20 against this. Df(1) just honors the latest option > given - no matter what the name of the option's name is. Renaming > an option is almost always a "suboptimal" thing for users. > In this case, some might be already used to type "df --human" which > would not be distinguishable from --human-si anymore. I completely agree. --human-si would be bad for this reason. --si-human perhaps would be better and backwards compatible, though probably not worth it because it would introduce incompatibility for scripts using the full --si-human and older systems supporting just --si. > The problem is maybe that "df --help" doesn't explicitly say that -h > is using powers of 1024 no matter what other option was given before. > > -h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G) > -H, --si likewise, but use powers of 1000 not 1024 > > However, the info page is quite clear about this: Very few read info pages, and anyway in this case we should be clear at the man page level. Mateusz stated the issue was that on a quick glance, the --si option wasn't described well enough in isolation. Likewise, the description of -h requires reading that of -H to know the power used. So hopefully the attached patch fixes this and more. thanks, Pádraig. --------------000205000309000101080202 Content-Type: text/x-patch; name="df--si-docs.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="df--si-docs.patch" >From 13bb95c51ac307cf008595971de4b47baa127dc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Mon, 3 Mar 2014 02:49:25 +0000 Subject: [PATCH] doc: improve df --human and --si, help and man page * src/df.c (usage): Adjust the --human and --si descriptions to not depend on each other. Also include an example that is illustrative of the rounding, suffix, width, and localized fractions. Fixes http://bugs.gnu.org/16922 --- src/df.c | 21 ++++++++++++++++----- 1 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/df.c b/src/df.c index e4fafb9..7143ff2 100644 --- a/src/df.c +++ b/src/df.c @@ -1252,6 +1252,18 @@ usage (int status) emit_try_help (); else { + const int example_size = 1023*1024*1024; + + int opts = human_autoscale; + + opts |= human_SI; + char si_buf[LONGEST_HUMAN_READABLE + 1]; + char const *si = human_readable (example_size, si_buf, opts, 1, 1); + + opts |= human_base_1024; + char human_buf[LONGEST_HUMAN_READABLE + 1]; + char const *human = human_readable (example_size, human_buf, opts, 1, 1); + printf (_("Usage: %s [OPTION]... [FILE]...\n"), program_name); fputs (_("\ Show information about the file system on which each FILE resides,\n\ @@ -1260,16 +1272,15 @@ or all file systems by default.\n\ emit_mandatory_arg_note (); - fputs (_("\ + printf (_("\ -a, --all include dummy file systems\n\ -B, --block-size=SIZE scale sizes by SIZE before printing them; e.g.,\n\ '-BM' prints sizes in units of 1,048,576 bytes;\n\ see SIZE format below\n\ --total produce a grand total\n\ - -h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G)\ -\n\ - -H, --si likewise, but use powers of 1000 not 1024\n\ -"), stdout); + -h, --human-readable print abbreviated sizes in powers of 1024 (e.g. %s)\n\ + -H, --si print abbreviated sizes in powers of 1000 (e.g. %s)\n\ +"), human, si); fputs (_("\ -i, --inodes list inode information instead of block usage\n\ -k like --block-size=1K\n\ -- 1.7.7.6 --------------000205000309000101080202-- From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 02 23:55:39 2014 Received: (at 16922) by debbugs.gnu.org; 3 Mar 2014 04:55:39 +0000 Received: from localhost ([127.0.0.1]:48420 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKKuf-0001fC-R6 for submit@debbugs.gnu.org; Sun, 02 Mar 2014 23:55:38 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]:57951) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKKuZ-0001ez-Il for 16922@debbugs.gnu.org; Sun, 02 Mar 2014 23:55:32 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 9372D39E801A; Sun, 2 Mar 2014 20:55:30 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VBQsylUkIBfR; Sun, 2 Mar 2014 20:55:30 -0800 (PST) Received: from [192.168.1.9] (pool-108-0-233-62.lsanca.fios.verizon.net [108.0.233.62]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 0433439E8018; Sun, 2 Mar 2014 20:55:29 -0800 (PST) Message-ID: <53140B41.3020203@cs.ucla.edu> Date: Sun, 02 Mar 2014 20:55:29 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: P@draigBrady.com Subject: Re: bug#16922: df --si -h should emit a warning References: <5313252F.1040403@o2.pl> <5313414F.1070607@draigBrady.com> <53136C7E.6000408@bernhard-voelker.de> <5313F0CE.5080201@draigBrady.com> In-Reply-To: <5313F0CE.5080201@draigBrady.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 16922 Cc: 16922@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Pádraig Brady wrote: > + -h, --human-readable print abbreviated sizes in powers of 1024 (e.g. %s)\n\ > + -H, --si print abbreviated sizes in powers of 1000 (e.g. %s)\n\ Thanks for looking into improving this. Please put commas after "e.g.". Also, I suggest removing "abbreviated", and simplifying the translator's job by simply interpolating the human. E.g.: -h, --human-readable print sizes in powers of 1024 (e.g., 1023M)\n\ -H, --si print sizes in powers of 1000 (e.g., 1.1G)\n\ From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 03 03:00:51 2014 Received: (at 16922-done) by debbugs.gnu.org; 3 Mar 2014 08:00:51 +0000 Received: from localhost ([127.0.0.1]:48494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKNnu-0007q3-CQ for submit@debbugs.gnu.org; Mon, 03 Mar 2014 03:00:50 -0500 Received: from moutng.kundenserver.de ([212.227.17.13]:50406) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKNnl-0007ph-Ql for 16922-done@debbugs.gnu.org; Mon, 03 Mar 2014 03:00:43 -0500 Received: from [192.168.1.11] (p57A5D1AD.dip0.t-ipconnect.de [87.165.209.173]) by mrelayeu.kundenserver.de (node=mreue101) with ESMTP (Nemesis) id 0MfYct-1WafMx0uxn-00P3qH; Mon, 03 Mar 2014 09:00:40 +0100 Message-ID: <531436A7.30306@bernhard-voelker.de> Date: Mon, 03 Mar 2014 09:00:39 +0100 From: Bernhard Voelker User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= Subject: Re: bug#16922: df --si -h should emit a warning References: <5313252F.1040403@o2.pl> <5313414F.1070607@draigBrady.com> <53136C7E.6000408@bernhard-voelker.de> <5313F0CE.5080201@draigBrady.com> In-Reply-To: <5313F0CE.5080201@draigBrady.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Provags-ID: V02:K0:1PvrAOs37/546Pi2qmI3D6usvS3IwY4j98sHfzTKa0z JH5kVUyw2efUDPLSKFHkbCs+RAuJa6MYCLQxhvC+2GkpyhzN5p rzpAgN7j0Okg+90y1aLs3x4ees1WPwtVJ00jVOctSFxJK8347i qLDuHXAy7AE+4NCDddz846PCSC5G3DqH+aKTjthyyH7cT2lYoX Q3Zr9PSUDSJuHyAv+QkLQut+9yDAGA16pVgRhY/w+heQSwPmr/ E+jNX65uxGhufjHPjoDnxypoLeB+ZM7Ck4s5KIJLwotoHhUltx 0SlZb5cflxl53rMIiVeBLSbNPS9MsnZ2wjy/CxoGWGUgQVmj7D QZH6Nfe0qJbwihTcZ7nRh24LHmTbxIUaWByLrxuVf X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 16922-done Cc: =?UTF-8?B?TWF0ZXVzeiBKb8WEY3p5aw==?= , 16922-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On 03/03/2014 04:02 AM, Pádraig Brady wrote: > Very few read info pages, and anyway in this case we should be clear at the man page level. > > Mateusz stated the issue was that on a quick glance, the --si option wasn't described > well enough in isolation. Likewise, the description of -h requires reading that of -H > to know the power used. So hopefully the attached patch fixes this and more. Hi Padraig, great idea to use an example, thanks. It's clearer than before: -h, --human-readable print abbreviated sizes in powers of 1024 (e.g. 1023M) -H, --si print abbreviated sizes in powers of 1000 (e.g. 1.1G) However, I still see 2 problems: a) The reader doesn't know the code, and therefore doesn't know that both numbers originate from a calculation based on the same number: > + const int example_size = 1023*1024*1024; I would be good to let the user know that. b) Both numbers are suffixed with the one-character notation (M,G), i.e. comparing that to the explanation of these below in the usage text, the reader may be confused again: SIZE is an integer and optional unit (example: 10M is 10*1024*1024). Units are K, M, G, T, P, E, Z, Y (powers of 1024) or KB, MB, ... (powers of 1000). Well, in the texinfo manual, it's mentioned that `M' can stand both for a mebibyte (in the -h case) as well as for a megabyte (in the -H case). But somehow this is confusing: when used in SIZE, i.e. together with -B as input option, then the user must use 'M' vs. 'MB' to make clear whether to use powers of 1024 vs. 1000, while df(1) doesn't make that difference in the output with -h vs. -H. $ src/df -h / | sed 1d /dev/sdb2 20G 8.7G 10G 47% / $ src/df -H / | sed 1d /dev/sdb2 22G 9.3G 11G 47% / Shouldn't it say 22GB etc. in the latter -H case? And "1.1GB" in the above usage text? Now I'm confused, too ... ;-/ Monday morning syndrome? Have a nice day, Berny From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 03 04:35:38 2014 Received: (at 16922) by debbugs.gnu.org; 3 Mar 2014 09:35:38 +0000 Received: from localhost ([127.0.0.1]:48522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKPHe-0001up-5t for submit@debbugs.gnu.org; Mon, 03 Mar 2014 04:35:38 -0500 Received: from mail5.vodafone.ie ([213.233.128.176]:62110) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKPHa-0001uZ-OO for 16922@debbugs.gnu.org; Mon, 03 Mar 2014 04:35:36 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjQCAMlLFFNtTltz/2dsb2JhbAANTYNBg1q6C4NAgTSDGQEBAQMBAQIgDwFGBQsLDQEKAgIFFgsCAgkDAgECARYvBg0BBwEBh20NCKpmdqBWF4EpjGJOB4JvgUkElWaECIVAjmY Received: from unknown (HELO [192.168.1.79]) ([109.78.91.115]) by mail3.vodafone.ie with ESMTP; 03 Mar 2014 09:35:32 +0000 Message-ID: <53144CE4.6010402@draigBrady.com> Date: Mon, 03 Mar 2014 09:35:32 +0000 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Bernhard Voelker Subject: Re: bug#16922: df --si -h should emit a warning References: <5313252F.1040403@o2.pl> <5313414F.1070607@draigBrady.com> <53136C7E.6000408@bernhard-voelker.de> <5313F0CE.5080201@draigBrady.com> <531436A7.30306@bernhard-voelker.de> In-Reply-To: <531436A7.30306@bernhard-voelker.de> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 16922 Cc: =?UTF-8?B?TWF0ZXVzeiBKb8WEY3p5aw==?= , 16922@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On 03/03/2014 08:00 AM, Bernhard Voelker wrote: > On 03/03/2014 04:02 AM, Pádraig Brady wrote: >> Very few read info pages, and anyway in this case we should be clear at the man page level. >> >> Mateusz stated the issue was that on a quick glance, the --si option wasn't described >> well enough in isolation. Likewise, the description of -h requires reading that of -H >> to know the power used. So hopefully the attached patch fixes this and more. > > Hi Padraig, > > great idea to use an example, thanks. > It's clearer than before: > > -h, --human-readable print abbreviated sizes in powers of 1024 (e.g. 1023M) > -H, --si print abbreviated sizes in powers of 1000 (e.g. 1.1G) > > However, I still see 2 problems: > > a) The reader doesn't know the code, and therefore doesn't know > that both numbers originate from a calculation based on the same > number: True. I considered mentioning that, but the user doesn't really _need_ to know that. The more mathematically inclined will see it immediately, but that's a small advantage and shouldn't be needed as we wanted these descriptions to be meaningful in isolation anyway. > >> + const int example_size = 1023*1024*1024; > > I would be good to let the user know that. > > b) Both numbers are suffixed with the one-character notation (M,G), > i.e. comparing that to the explanation of these below in the usage > text, the reader may be confused again: > > SIZE is an integer and optional unit (example: 10M is 10*1024*1024). Units > are K, M, G, T, P, E, Z, Y (powers of 1024) or KB, MB, ... (powers of 1000). So SIZE here refers to the _input_ argument mentioned previously in the --help. We might make this a bit more clear with BSIZE, but this same note is refactored for use by df, du, ls, split, truncate. truncate(1) for example uses it to refer to both a threshold and block size. Perhaps we should clarify like: The SIZE argument is an integer and optional unit (example: 10K is 10*1024). Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB, ... (powers of 1000). > Well, in the texinfo manual, it's mentioned that `M' can stand both for > a mebibyte (in the -h case) as well as for a megabyte (in the -H case). > But somehow this is confusing: when used in SIZE, i.e. together with -B > as input option, then the user must use 'M' vs. 'MB' to make clear whether > to use powers of 1024 vs. 1000, while df(1) doesn't make that difference > in the output with -h vs. -H. > > $ src/df -h / | sed 1d > /dev/sdb2 20G 8.7G 10G 47% / > > $ src/df -H / | sed 1d > /dev/sdb2 22G 9.3G 11G 47% / > > Shouldn't it say 22GB etc. in the latter -H case? And "1.1GB" in > the above usage text? Now I'm confused, too ... ;-/ > Monday morning syndrome? It is confusing unfortunately. I previously summarized some of these inconsistencies here: http://lists.gnu.org/archive/html/coreutils/2012-09/msg00179.html Who would have thought that df would have so many inconsistencies and edge cases :/ thanks, Pádraig. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 03 04:36:28 2014 Received: (at 16922) by debbugs.gnu.org; 3 Mar 2014 09:36:28 +0000 Received: from localhost ([127.0.0.1]:48526 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKPIR-0001wS-Tv for submit@debbugs.gnu.org; Mon, 03 Mar 2014 04:36:28 -0500 Received: from mail5.vodafone.ie ([213.233.128.176]:52437) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKPIQ-0001wK-7R for 16922@debbugs.gnu.org; Mon, 03 Mar 2014 04:36:26 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApQBAMlLFFNtTltz/2dsb2JhbAANTQ6HDbo/gwyBNIMZAQEBBCMPAUYQCw0LAgIFFgsCAgkDAgECAUUGDQEHAQGHeqpudqBWF4EpjTAHgm+BSQEDny6OJz8 Received: from unknown (HELO [192.168.1.79]) ([109.78.91.115]) by mail3.vodafone.ie with ESMTP; 03 Mar 2014 09:36:24 +0000 Message-ID: <53144D18.6060709@draigBrady.com> Date: Mon, 03 Mar 2014 09:36:24 +0000 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Paul Eggert Subject: Re: bug#16922: df --si -h should emit a warning References: <5313252F.1040403@o2.pl> <5313414F.1070607@draigBrady.com> <53136C7E.6000408@bernhard-voelker.de> <5313F0CE.5080201@draigBrady.com> <53140B41.3020203@cs.ucla.edu> In-Reply-To: <53140B41.3020203@cs.ucla.edu> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 16922 Cc: 16922@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On 03/03/2014 04:55 AM, Paul Eggert wrote: > Pádraig Brady wrote: >> + -h, --human-readable print abbreviated sizes in powers of 1024 (e.g. %s)\n\ >> + -H, --si print abbreviated sizes in powers of 1000 (e.g. %s)\n\ > > Thanks for looking into improving this. Please put commas after "e.g.". Also, I suggest removing "abbreviated", and simplifying the translator's job by simply interpolating the human. E.g.: > > -h, --human-readable print sizes in powers of 1024 (e.g., 1023M)\n\ > -H, --si print sizes in powers of 1000 (e.g., 1.1G)\n\ Better thanks. I've rolled that into my local patch. thanks, Pádraig. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 03 05:07:01 2014 Received: (at 16922) by debbugs.gnu.org; 3 Mar 2014 10:07:01 +0000 Received: from localhost ([127.0.0.1]:48536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKPm0-0002o7-F1 for submit@debbugs.gnu.org; Mon, 03 Mar 2014 05:07:00 -0500 Received: from moutng.kundenserver.de ([212.227.126.131]:52980) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKPlw-0002nw-MJ for 16922@debbugs.gnu.org; Mon, 03 Mar 2014 05:06:57 -0500 Received: from [10.0.2.15] (gw.camline.com [62.153.148.194]) by mrelayeu.kundenserver.de (node=mreue001) with ESMTP (Nemesis) id 0MN9eS-1WICqF1dlY-006d1Q; Mon, 03 Mar 2014 11:06:55 +0100 Message-ID: <5314543F.8030709@bernhard-voelker.de> Date: Mon, 03 Mar 2014 11:06:55 +0100 From: Bernhard Voelker User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= Subject: Re: bug#16922: df --si -h should emit a warning References: <5313252F.1040403@o2.pl> <5313414F.1070607@draigBrady.com> <53136C7E.6000408@bernhard-voelker.de> <5313F0CE.5080201@draigBrady.com> <531436A7.30306@bernhard-voelker.de> <53144CE4.6010402@draigBrady.com> In-Reply-To: <53144CE4.6010402@draigBrady.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V02:K0:lY/TcQZN548SBLxAMt7fhYrxn8ScANagP4ByctKRCMc eY1IlIbWqGw4vGCD991QJX/s4GU9Z16yQY6X0rWGW9aiylIjPS +R3Qc6dlEVSQlJimSUPviwMDrvGNoInJwuW7NZGjekimvI6SEO eieRp5cPYy1w3NpHJ/CtFSrxvm2b2CuGvZdVqKqOgHKssWcLcs VQJVVtOVzwYKjxh89TZ4ucPbBltI5F/z1wILaH6qWnfMTQDYNi 2ESxL0FU9LHZN/PTxnJ2BRBwi6Afpk0PAYI4gnfNCDrFbFECNR 7Bvwy84gSCeHyf9Yz3KtwNgQ4xv5HUGMiJz5hU5p7IkI7IeloF afkxmBDQwqB8WJjYd1tHRpPel4bNIIZFKWxPnP+3b X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 16922 Cc: =?UTF-8?B?TWF0ZXVzeiBKb8WEY3p5aw==?= , 16922@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On 03/03/2014 10:35 AM, Pádraig Brady wrote: > On 03/03/2014 08:00 AM, Bernhard Voelker wrote: >> On 03/03/2014 04:02 AM, Pádraig Brady wrote: >> -h, --human-readable print abbreviated sizes in powers of 1024 (e.g. 1023M) >> -H, --si print abbreviated sizes in powers of 1000 (e.g. 1.1G) >> >> However, I still see 2 problems: >> >> a) The reader doesn't know the code, and therefore doesn't know >> that both numbers originate from a calculation based on the same >> number: > > True. I considered mentioning that, but the user doesn't really _need_ > to know that. The more mathematically inclined will see it immediately, > but that's a small advantage and shouldn't be needed as we wanted these > descriptions to be meaningful in isolation anyway. I agree. >>> + const int example_size = 1023*1024*1024; >> >> I would be good to let the user know that. >> >> b) Both numbers are suffixed with the one-character notation (M,G), >> i.e. comparing that to the explanation of these below in the usage >> text, the reader may be confused again: >> >> SIZE is an integer and optional unit (example: 10M is 10*1024*1024). Units >> are K, M, G, T, P, E, Z, Y (powers of 1024) or KB, MB, ... (powers of 1000). > > So SIZE here refers to the _input_ argument mentioned previously in the --help. > We might make this a bit more clear with BSIZE, but this same note is refactored > for use by df, du, ls, split, truncate. truncate(1) for example uses it to refer > to both a threshold and block size. Perhaps we should clarify like: > > The SIZE argument is an integer and optional unit (example: 10K is 10*1024). > Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB, ... (powers of 1000). Good idea. Thanks. >> Well, in the texinfo manual, it's mentioned that `M' can stand both for >> a mebibyte (in the -h case) as well as for a megabyte (in the -H case). >> But somehow this is confusing: when used in SIZE, i.e. together with -B >> as input option, then the user must use 'M' vs. 'MB' to make clear whether >> to use powers of 1024 vs. 1000, while df(1) doesn't make that difference >> in the output with -h vs. -H. >> >> $ src/df -h / | sed 1d >> /dev/sdb2 20G 8.7G 10G 47% / >> >> $ src/df -H / | sed 1d >> /dev/sdb2 22G 9.3G 11G 47% / >> >> Shouldn't it say 22GB etc. in the latter -H case? And "1.1GB" in >> the above usage text? Now I'm confused, too ... ;-/ >> Monday morning syndrome? > > It is confusing unfortunately. > I previously summarized some of these inconsistencies here: > http://lists.gnu.org/archive/html/coreutils/2012-09/msg00179.html Thanks for the link ... it seems that it's always only me who is confused, and coincidentally that post was also on a Monday. ;-) Therefore, I think we can go with the stuff you have in your local patch. Thanks & have a nice day, Berny From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 03 05:54:25 2014 Received: (at 16922) by debbugs.gnu.org; 3 Mar 2014 10:54:25 +0000 Received: from localhost ([127.0.0.1]:48556 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKQVs-00043A-M6 for submit@debbugs.gnu.org; Mon, 03 Mar 2014 05:54:25 -0500 Received: from mail4.vodafone.ie ([213.233.128.170]:15848) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKQVp-00042y-Ra for 16922@debbugs.gnu.org; Mon, 03 Mar 2014 05:54:22 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApQBAIdeFFNtTltz/2dsb2JhbAANTQ6HDbo/gwyBNoMZAQEBBCMPAUYQCw0LAgIFFgsCAgkDAgECAUUGDQEHAQGHeqpqdqBVF4EpjTAHgm+BSQEDny6OJz8 Received: from unknown (HELO [192.168.1.79]) ([109.78.91.115]) by mail3.vodafone.ie with ESMTP; 03 Mar 2014 10:54:20 +0000 Message-ID: <53145F5B.7000801@draigBrady.com> Date: Mon, 03 Mar 2014 10:54:19 +0000 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Paul Eggert Subject: Re: bug#16922: df --si -h should emit a warning References: <5313252F.1040403@o2.pl> <5313414F.1070607@draigBrady.com> <53136C7E.6000408@bernhard-voelker.de> <5313F0CE.5080201@draigBrady.com> <53140B41.3020203@cs.ucla.edu> <53144D18.6060709@draigBrady.com> In-Reply-To: <53144D18.6060709@draigBrady.com> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 16922 Cc: 16922@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On 03/03/2014 09:36 AM, Pádraig Brady wrote: > On 03/03/2014 04:55 AM, Paul Eggert wrote: >> Pádraig Brady wrote: >>> + -h, --human-readable print abbreviated sizes in powers of 1024 (e.g. %s)\n\ >>> + -H, --si print abbreviated sizes in powers of 1000 (e.g. %s)\n\ >> >> Thanks for looking into improving this. Please put commas after "e.g.". Also, I suggest removing "abbreviated", and simplifying the translator's job by simply interpolating the human. E.g.: >> >> -h, --human-readable print sizes in powers of 1024 (e.g., 1023M)\n\ >> -H, --si print sizes in powers of 1000 (e.g., 1.1G)\n\ > > Better thanks. > I've rolled that into my local patch. Actually I left the %s in the string to be replaced at runtime, so that 1.1G or 1,1G is output as appropriate. thanks, Pádraig. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 03 06:35:49 2014 Received: (at 16922) by debbugs.gnu.org; 3 Mar 2014 11:35:49 +0000 Received: from localhost ([127.0.0.1]:48573 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKR9w-0005AI-TE for submit@debbugs.gnu.org; Mon, 03 Mar 2014 06:35:49 -0500 Received: from mail4.vodafone.ie ([213.233.128.170]:49395) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKR9u-0005A7-0a for 16922@debbugs.gnu.org; Mon, 03 Mar 2014 06:35:47 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqYBAAVoFFNtTltz/2dsb2JhbAANTQ6DM1GDCb1LgTeDGQEBAQQjVhALDQQDAQIBCRYLAgIJAwIBAgE9CAYNAQUCAQGHegOqdXagVReOSAwFB4JvgUkEkEiBNIdyhUCFdIgzPw Received: from unknown (HELO [192.168.1.79]) ([109.78.91.115]) by mail3.vodafone.ie with ESMTP; 03 Mar 2014 11:35:44 +0000 Message-ID: <53146910.3020808@draigBrady.com> Date: Mon, 03 Mar 2014 11:35:44 +0000 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Paul Eggert Subject: Re: bug#16922: df --si -h should emit a warning References: <5313252F.1040403@o2.pl> <5313414F.1070607@draigBrady.com> <53136C7E.6000408@bernhard-voelker.de> <5313F0CE.5080201@draigBrady.com> <53140B41.3020203@cs.ucla.edu> <53144D18.6060709@draigBrady.com> <53145F5B.7000801@draigBrady.com> In-Reply-To: <53145F5B.7000801@draigBrady.com> X-Enigmail-Version: 1.6 Content-Type: multipart/mixed; boundary="------------000502080904000505080708" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 16922 Cc: 16922@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) This is a multi-part message in MIME format. --------------000502080904000505080708 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 03/03/2014 10:54 AM, Pádraig Brady wrote: > On 03/03/2014 09:36 AM, Pádraig Brady wrote: >> On 03/03/2014 04:55 AM, Paul Eggert wrote: >>> Pádraig Brady wrote: >>>> + -h, --human-readable print abbreviated sizes in powers of 1024 (e.g. %s)\n\ >>>> + -H, --si print abbreviated sizes in powers of 1000 (e.g. %s)\n\ >>> >>> Thanks for looking into improving this. Please put commas after "e.g.". Also, I suggest removing "abbreviated", and simplifying the translator's job by simply interpolating the human. E.g.: >>> >>> -h, --human-readable print sizes in powers of 1024 (e.g., 1023M)\n\ >>> -H, --si print sizes in powers of 1000 (e.g., 1.1G)\n\ >> >> Better thanks. >> I've rolled that into my local patch. > > Actually I left the %s in the string to be replaced at runtime, > so that 1.1G or 1,1G is output as appropriate. I suppose it's better to err on the side of less code, and let the translator adjust, assuming LC_MESSAGES == LC_NUMERIC. The alternative edge case is probably not worth the extra code. I'll push the attached soon. thanks, Pádraig. --------------000502080904000505080708 Content-Type: text/x-patch; name="df--si-docs.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="df--si-docs.patch" >From 27466409bbdf75d3d2757a279b6042a521858626 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Mon, 3 Mar 2014 02:49:25 +0000 Subject: [PATCH] doc: improve df --human and --si, help and man page * src/df.c (usage): Adjust the --human and --si descriptions to not depend on each other. Also include an example that is illustrative of the rounding, suffix, width, and localized fractions. * src/system.h (emit_size_note). Adjust so that it's obvious the description is pertaining to the input SIZE argument, and not to any sizes that might be output by df for example. Fixes http://bugs.gnu.org/16922 --- src/df.c | 5 ++--- src/system.h | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/df.c b/src/df.c index e4fafb9..af41a0a 100644 --- a/src/df.c +++ b/src/df.c @@ -1266,9 +1266,8 @@ or all file systems by default.\n\ '-BM' prints sizes in units of 1,048,576 bytes;\n\ see SIZE format below\n\ --total produce a grand total\n\ - -h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G)\ -\n\ - -H, --si likewise, but use powers of 1000 not 1024\n\ + -h, --human-readable print sizes in powers of 1024 (e.g., 1023M)\n\ + -H, --si print sizes in powers of 1000 (e.g., 1.1G)\n\ "), stdout); fputs (_("\ -i, --inodes list inode information instead of block usage\n\ diff --git a/src/system.h b/src/system.h index 39750e8..a9588e7 100644 --- a/src/system.h +++ b/src/system.h @@ -549,8 +549,8 @@ static inline void emit_size_note (void) { fputs (_("\n\ -SIZE is an integer and optional unit (example: 10M is 10*1024*1024). Units\n\ -are K, M, G, T, P, E, Z, Y (powers of 1024) or KB, MB, ... (powers of 1000).\n\ +The SIZE argument is an integer and optional unit (example: 10K is 10*1024).\n\ +Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,... (powers of 1000).\n\ "), stdout); } -- 1.7.7.6 --------------000502080904000505080708-- From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 03 09:30:26 2014 Received: (at 16922) by debbugs.gnu.org; 3 Mar 2014 14:30:27 +0000 Received: from localhost ([127.0.0.1]:48685 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKTsu-0003fb-Tu for submit@debbugs.gnu.org; Mon, 03 Mar 2014 09:30:25 -0500 Received: from moutng.kundenserver.de ([212.227.126.130]:64550) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKTsM-0003e4-TK for 16922@debbugs.gnu.org; Mon, 03 Mar 2014 09:29:52 -0500 Received: from [10.0.2.15] (gw.camline.com [62.153.148.194]) by mrelayeu.kundenserver.de (node=mreue003) with ESMTP (Nemesis) id 0Ls5U3-1XLyrb28it-013y7c; Mon, 03 Mar 2014 15:29:48 +0100 Message-ID: <531491DB.6060706@bernhard-voelker.de> Date: Mon, 03 Mar 2014 15:29:47 +0100 From: Bernhard Voelker User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= , Paul Eggert Subject: Re: bug#16922: df --si -h should emit a warning References: <5313252F.1040403@o2.pl> <5313414F.1070607@draigBrady.com> <53136C7E.6000408@bernhard-voelker.de> <5313F0CE.5080201@draigBrady.com> <53140B41.3020203@cs.ucla.edu> <53144D18.6060709@draigBrady.com> <53145F5B.7000801@draigBrady.com> <53146910.3020808@draigBrady.com> In-Reply-To: <53146910.3020808@draigBrady.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V02:K0:ChrV8SjTO1NVRpLkjKM83xYakmQYa22WKmoqYOWlOLT TT70hLjR+96mj0BPHLPg5o1M7iRvLCRoBpy/qFNbYG5lW86JNb tDa/CoGQM01+wA2oCaOXdw/X9nRjJ3leWlhlcwhJZ9TJUv+JYe IRcWpGbszy3pK1Eumk1yHWfNTHVv16nubG0jgq9Yk13goZlFN0 9pO2flS+2OaLMOmPIVpdFTfeGpLv3e7Yo5x6wYgczrGqniMoNZ kr/rdZioQij7RdjURL2+dDR22lBIuaFBzk8xi/7qJ+/xlUbmee Rc2elD8Uy0ynSaMOduYyrxgbfCFbeEhGJGAIRHSk0zKj21pekc 3DN8HSAIan19XFhdnqcZwWZ3GymJuJ6Q9VdcO3muW X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 16922 Cc: 16922@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On 03/03/2014 12:35 PM, Pádraig Brady wrote: > I suppose it's better to err on the side of less code, > and let the translator adjust, assuming LC_MESSAGES == LC_NUMERIC. > The alternative edge case is probably not worth the extra code. > > I'll push the attached soon. +1 Thanks! Have a nice day, Berny From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 03 10:20:08 2014 Received: (at 16922) by debbugs.gnu.org; 3 Mar 2014 15:20:08 +0000 Received: from localhost ([127.0.0.1]:49248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKUf0-00055V-IL for submit@debbugs.gnu.org; Mon, 03 Mar 2014 10:20:07 -0500 Received: from moh3-ve2.go2.pl ([193.17.41.86]:60671 helo=moh3-ve1.go2.pl) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKUev-00054o-EE for 16922@debbugs.gnu.org; Mon, 03 Mar 2014 10:20:03 -0500 Received: from moh3-ve1.go2.pl (unknown [10.0.0.157]) by moh3-ve1.go2.pl (Postfix) with ESMTP id 7073FAF696A for <16922@debbugs.gnu.org>; Mon, 3 Mar 2014 16:20:00 +0100 (CET) Received: from unknown (unknown [10.0.0.74]) by moh3-ve1.go2.pl (Postfix) with SMTP for <16922@debbugs.gnu.org>; Mon, 3 Mar 2014 16:20:00 +0100 (CET) Received: from aaer125.neoplus.adsl.tpnet.pl [83.4.121.125] by poczta.o2.pl with ESMTP id WfCMvS; Mon, 03 Mar 2014 16:20:00 +0100 Message-ID: <53149D9F.9010105@o2.pl> Date: Mon, 03 Mar 2014 16:19:59 +0100 From: =?UTF-8?B?TWF0ZXVzeiBKb8WEY3p5aw==?= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= , Bernhard Voelker Subject: Re: bug#16922: df --si -h should emit a warning References: <5313252F.1040403@o2.pl> <5313414F.1070607@draigBrady.com> <53136C7E.6000408@bernhard-voelker.de> <5313F0CE.5080201@draigBrady.com> In-Reply-To: <5313F0CE.5080201@draigBrady.com> X-Enigmail-Version: 1.5.2 OpenPGP: id=2C64C488 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-O2-Trust: 2, 66 X-O2-SPF: notchecked X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 16922 Cc: 16922@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 W dniu 03.03.2014 04:02, Pádraig Brady pisze: > On 03/02/2014 05:38 PM, Bernhard Voelker wrote: Very few read info pages, and > anyway in this case we should be clear at the man page level. > > Mateusz stated the issue was that on a quick glance, the --si option wasn't > described well enough in isolation. Likewise, the description of -h requires > reading that of -H to know the power used. So hopefully the attached patch fixes > this and more. > This patch fixes only the --help output, not the man page (which should be done separately). Seriously, wouldn't it be better to hardcode 1023M and 1.1G(B) into the code then calculate them every time? > thanks, Pádraig. > W dniu 03.03.2014 11:06, Bernhard Voelker pisze: > On 03/03/2014 10:35 AM, Pádraig Brady wrote: >> So SIZE here refers to the _input_ argument mentioned previously in the >> --help. We might make this a bit more clear with BSIZE, but this same note is >> refactored for use by df, du, ls, split, truncate. truncate(1) for example >> uses it to refer to both a threshold and block size. Perhaps we should clarify >> like: >> >> The SIZE argument is an integer and optional unit (example: 10K is 10*1024). >> Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB, ... (powers of 1000). > > Good idea. Thanks. > Maybe: "The SIZE argument consists of an integer and an optional unit." > Thanks for the link ... it seems that it's always only me who is confused, and > coincidentally that post was also on a Monday. ;-) Therefore, I think we can go > with the stuff you have in your local patch. > > Thanks & have a nice day, Berny - -- Pozdrawiam, Mateusz Jończyk AEI, Informatyka, Semestr 2 Magisterskich, BDiIS -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: My public key: 0x2C64C488 on hkp://pool.sks-keyservers.net Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJTFJ2dAAoJELLT9LcsZMSIukMIAKaUog2zoY/0Ytkrv5zXSk7o f5tReuQ4HODIVTdJVDbjstKxavOTbIBAB0unEgZ+NJfdKNLNWvm0cJVwa6ipnCuI 1Quv6tfNo7szYFKsQFTsFXt5LGpH6e5r8amWwxUF3WmTeqRTHq6JNL56HVzb/CYx 3Fsm8QVO3bKQ/BC7GCK6K41war++lz+zG6cOJuKeXXxh96T1EMIGhSDpi8bcENwK nEQZk5N3RnWY7Y7iswYyDgXpBBaFrMTtEgHjrMskl5hf3hkYGf186IokpSW+C2jI LZeu3LsMrpCg+0sd1w8nP46Sr+D/3QHdxaDYgg41YaSBzesj5jqUEGUqnAieYWY= =4cxU -----END PGP SIGNATURE----- From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 03 11:41:17 2014 Received: (at 16922) by debbugs.gnu.org; 3 Mar 2014 16:41:17 +0000 Received: from localhost ([127.0.0.1]:49293 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKVvY-0007Dd-JC for submit@debbugs.gnu.org; Mon, 03 Mar 2014 11:41:17 -0500 Received: from mail3.vodafone.ie ([213.233.128.45]:65147) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKVvV-0007DP-1V for 16922@debbugs.gnu.org; Mon, 03 Mar 2014 11:41:14 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApQBALuvFFNtTltz/2dsb2JhbAANTYcbukGDDIE4gxkBAQEDASMPAUYFCwsNCwICBRYLAgIJAwIBAgFFBg0BBwEBh20NqxN2oCAXgSmMYk4Hgm+BSQEDny6OZg Received: from unknown (HELO [192.168.1.79]) ([109.78.91.115]) by mail3.vodafone.ie with ESMTP; 03 Mar 2014 16:41:11 +0000 Message-ID: <5314B0A6.4000403@draigBrady.com> Date: Mon, 03 Mar 2014 16:41:10 +0000 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: =?UTF-8?B?TWF0ZXVzeiBKb8WEY3p5aw==?= Subject: Re: bug#16922: df --si -h should emit a warning References: <5313252F.1040403@o2.pl> <5313414F.1070607@draigBrady.com> <53136C7E.6000408@bernhard-voelker.de> <5313F0CE.5080201@draigBrady.com> <53149D9F.9010105@o2.pl> In-Reply-To: <53149D9F.9010105@o2.pl> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 16922 Cc: Bernhard Voelker , 16922@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On 03/03/2014 03:19 PM, Mateusz Jończyk wrote: > W dniu 03.03.2014 04:02, Pádraig Brady pisze: >> On 03/02/2014 05:38 PM, Bernhard Voelker wrote: Very few read info pages, and >> anyway in this case we should be clear at the man page level. > >> Mateusz stated the issue was that on a quick glance, the --si option wasn't >> described well enough in isolation. Likewise, the description of -h requires >> reading that of -H to know the power used. So hopefully the attached patch fixes >> this and more. > > This patch fixes only the --help output, not the man page (which should be done > separately). The man pages are generated from --help > Seriously, wouldn't it be better to hardcode 1023M and 1.1G(B) into the code then > calculate them every time? Yes we've already switched to hardcoded values with associated translator notes. > W dniu 03.03.2014 11:06, Bernhard Voelker pisze: >> On 03/03/2014 10:35 AM, Pádraig Brady wrote: >>> So SIZE here refers to the _input_ argument mentioned previously in the >>> --help. We might make this a bit more clear with BSIZE, but this same note is >>> refactored for use by df, du, ls, split, truncate. truncate(1) for example >>> uses it to refer to both a threshold and block size. Perhaps we should clarify >>> like: >>> >>> The SIZE argument is an integer and optional unit (example: 10K is 10*1024). >>> Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB, ... (powers of 1000). > >> Good idea. Thanks. > > Maybe: > "The SIZE argument consists of an integer and an optional unit." Sometimes these are worded slightly awkwardly to be more concise and fit available space. thanks, Pádraig. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 03 12:27:38 2014 Received: (at 16922) by debbugs.gnu.org; 3 Mar 2014 17:27:38 +0000 Received: from localhost ([127.0.0.1]:49355 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKWeQ-0008VC-A3 for submit@debbugs.gnu.org; Mon, 03 Mar 2014 12:27:38 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43013) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKWeM-0008V1-9d for 16922@debbugs.gnu.org; Mon, 03 Mar 2014 12:27:35 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s23HRQOI020395 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 3 Mar 2014 12:27:26 -0500 Received: from [10.3.113.179] (ovpn-113-179.phx2.redhat.com [10.3.113.179]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s23HRLcE016069; Mon, 3 Mar 2014 12:27:26 -0500 Message-ID: <5314BB79.9030805@redhat.com> Date: Mon, 03 Mar 2014 10:27:21 -0700 From: Eric Blake Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: =?UTF-8?B?TWF0ZXVzeiBKb8WEY3p5aw==?= , =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= , Bernhard Voelker Subject: Re: bug#16922: df --si -h should emit a warning References: <5313252F.1040403@o2.pl> <5313414F.1070607@draigBrady.com> <53136C7E.6000408@bernhard-voelker.de> <5313F0CE.5080201@draigBrady.com> <53149D9F.9010105@o2.pl> In-Reply-To: <53149D9F.9010105@o2.pl> X-Enigmail-Version: 1.6 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5T2mV0fucBc84PmloN5fnTs6E1XUxM2Gi" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 16922 Cc: 16922@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --5T2mV0fucBc84PmloN5fnTs6E1XUxM2Gi Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/03/2014 08:19 AM, Mateusz Jo=C5=84czyk wrote: > W dniu 03.03.2014 04:02, P=C3=A1draig Brady pisze: >> On 03/02/2014 05:38 PM, Bernhard Voelker wrote: Very few read info pag= es, and >> anyway in this case we should be clear at the man page level. >=20 >> Mateusz stated the issue was that on a quick glance, the --si option w= asn't >> described well enough in isolation. Likewise, the description of -h re= quires >> reading that of -H to know the power used. So hopefully the attached p= atch fixes >> this and more. >=20 > This patch fixes only the --help output, not the man page (which should= be done > separately). The man page is auto-generated from the --help output. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --5T2mV0fucBc84PmloN5fnTs6E1XUxM2Gi Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTFLt5AAoJEKeha0olJ0NqT2EIAJOv+6CutF39VBEes+kMwOO7 Bq65fgSB9aBhEzhiJ5JddE64E4J5pZRMibR3w7MSl5SITy+WMocH2Cc7BIbHOsfj ulPR6HwawuWvkT7ueHhFDB74V8x0CwRn61VfYErCEA+awCu7gZRIwPP0Gons/ww+ RegzWxqpqjzOFkpi15mQOrwU/Vgk3uCtf9sxBxnwRgzu0HiE3cVZzs/aB+FSNpDO VTnnvVU9GyUJfxGxd/h5AVMO4iEKGEIZ1HL0fOyThk+qlc+VcxmFTpmJJHnYhQCV EgId1lC5WrLqjCU8W5GtU95Lw49IOzTL3SY1xktCElE7A1r9R93sMImtUmdEY/M= =CZ5d -----END PGP SIGNATURE----- --5T2mV0fucBc84PmloN5fnTs6E1XUxM2Gi-- From unknown Sat Aug 16 21:01:21 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 01 Apr 2014 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator