From unknown Sat Sep 13 00:10:56 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#50940 <50940@debbugs.gnu.org> To: bug#50940 <50940@debbugs.gnu.org> Subject: Status: how df utility displays sizes - GB vs GiB Reply-To: bug#50940 <50940@debbugs.gnu.org> Date: Sat, 13 Sep 2025 07:10:56 +0000 retitle 50940 how df utility displays sizes - GB vs GiB reassign 50940 coreutils submitter 50940 Danie de Jager severity 50940 wishlist thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 01 11:02:00 2021 Received: (at submit) by debbugs.gnu.org; 1 Oct 2021 15:02:00 +0000 Received: from localhost ([127.0.0.1]:57103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWK2x-0006mW-U4 for submit@debbugs.gnu.org; Fri, 01 Oct 2021 11:02:00 -0400 Received: from lists.gnu.org ([209.51.188.17]:59950) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWIaP-0003dk-Ch for submit@debbugs.gnu.org; Fri, 01 Oct 2021 09:28:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56992) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWIaO-0001YS-Fd for bug-coreutils@gnu.org; Fri, 01 Oct 2021 09:28:25 -0400 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]:41475) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWIaN-0002lb-4h for bug-coreutils@gnu.org; Fri, 01 Oct 2021 09:28:24 -0400 Received: by mail-pl1-x62b.google.com with SMTP id x8so6289343plv.8 for ; Fri, 01 Oct 2021 06:28:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=xNpA12B7H/DeVB1jpR6zGldwlrkNsNorJ2d0U3iwN+0=; b=OWtdXEc27y5tjYa/6utA/jBGG8h6vZVFBK+ZtB1pNC9G2y+wdjVlkWJNVxdv5D8u2q ka53DB/1gA219WF96LosMnPSH395ouuopmtSENXjFE8oSQNoBpGrFH9RAfPTAYtShBlF Y4+ARvFhTme3x2t6V4IZvztxu1/LFiNnpWgy9G8MrAy8g3rm6FN5F+x21wq81URlkW3I 7mh7JQ/tR+WCxOfZzUlIu5fH/k9LGfG9fIS658ij16Cit755DF00HQbgpstFqXR6KC7N DwkDSqiuLfm8bUOWmbuoC++muZMIMl6eI9or0QsjSqEigVFqTRY5WRssH0R8N1LXmd9O c68A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=xNpA12B7H/DeVB1jpR6zGldwlrkNsNorJ2d0U3iwN+0=; b=J99luRY+wb9ML15oluLoj8TKQLIXItbiMP7i9HQLxKNa6LIyvEnEs7J7UKRwcQ4kz6 1pQQTic+ILL0gQp5yM2Lwxeb1H7okMLM19L7PobKGcvKYQL6EJVuzKFP4OfTaPg2WyMR HhYm09lhPAp5YotQjDw9saVVE0p/kHNC8nV3FcPPGINjVaeCzjwgGR9UxyZqxQFYMyll LlHczQzPvLjmxbpbVoYNM7JnDYzjOgsQmcPNX6WJR4jra+fwsU25Ssu/lbRlKs5Xwgn+ +kW9MZEEgouQrp+M+tw8PRUGySMg0mOPlFMF6oCCeNRYra2xc+BdJlVUPMnnn1N46wGo 5FWQ== X-Gm-Message-State: AOAM5310kB/I9TZigUadvp3AwOO0OCudPo37y1TFbiWTnuvH8zvOKPXu fNI8wQZPO9LtyzICZhujHj3Hoh73JzhlPBb+ZM+HM8NTH2c= X-Google-Smtp-Source: ABdhPJwwCJn3KNX0kwuEeCK7/M0raEkfXreqBYWpvqPVMK0KyS+T2lXIB7JKkOjtngvuFeF7uPATDmv7GCHYVnfC0+4= X-Received: by 2002:a17:90a:312:: with SMTP id 18mr19902936pje.178.1633094900416; Fri, 01 Oct 2021 06:28:20 -0700 (PDT) MIME-Version: 1.0 From: Danie de Jager Date: Fri, 1 Oct 2021 15:28:10 +0200 Message-ID: Subject: how df utility displays sizes - GB vs GiB To: bug-coreutils@gnu.org Content-Type: multipart/alternative; boundary="0000000000006c824b05cd4a8913" Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=danie.dejager@gmail.com; helo=mail-pl1-x62b.google.com X-Spam_score_int: 6 X-Spam_score: 0.6 X-Spam_bar: / X-Spam_report: (0.6 / 5.0 requ) BAYES_50=0.8, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 01 Oct 2021 11:01:59 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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 (--) --0000000000006c824b05cd4a8913 Content-Type: text/plain; charset="UTF-8" Hi, The output from df -h and df -H is always G or M. Depending on who sends me usage stats I have to ask how the command was run to make sure I calculate usage correctly. Systems like Amazon EC2 use the explicit GiB suffix. Making it easier to know what sizes you are looking at. Can a future release of df not be improved to print out the GB or GiB? Regards, Danie --0000000000006c824b05cd4a8913 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

The output from df -h and df -H is = always G or M. Depending on who sends me usage stats I have to ask how the = command was run to make sure I calculate usage correctly. Systems like Amaz= on EC2 use the explicit GiB suffix. Making it easier to know what sizes you= are looking at.

Can a future release of df not be= improved to print out the GB or GiB?

Regards,
Danie
--0000000000006c824b05cd4a8913-- From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 01 12:18:18 2021 Received: (at 50940) by debbugs.gnu.org; 1 Oct 2021 16:18:18 +0000 Received: from localhost ([127.0.0.1]:57186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWLEn-0002Ut-PB for submit@debbugs.gnu.org; Fri, 01 Oct 2021 12:18:17 -0400 Received: from mail-wr1-f54.google.com ([209.85.221.54]:38437) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWLEl-0002Ud-BI for 50940@debbugs.gnu.org; Fri, 01 Oct 2021 12:18:17 -0400 Received: by mail-wr1-f54.google.com with SMTP id u18so16328464wrg.5 for <50940@debbugs.gnu.org>; Fri, 01 Oct 2021 09:18:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=f+tFycm8Y7Ik3TmsrFpiz0Lh98/cbAr3MzFJkIF2J6Y=; b=h2W3PyXe09mR2NDp4erkPw1w9/ynhXCVRDeLfzWdirVe1wB7rZAf3qsVeZG4/jxWgR wOZ5qORARcwtuGIPSDdoIAJpDEoIP7M8vEZKoaBpWxZBQ/u7N6qDWqwyDa2lZKFVGIGD bMHOWBi+0ugeIzRsh4nD8+B7KMuG2iXbs7vy2jrQAIKQ57RZy2FBFMyAyQEdhF6rz6kg 6zIdW3LU7Y0yrHWaRqDiVspuy1l6KiqP0n2plqZwxxqD33cCMxWQskJHNHmrvh9npwob ipvaIe1J13Fk93clyFD6AcoA8ZdmM6jCfd3LxXYH+ShSsDOQ+pPUKBh0E+x0cxIBqGWq V2EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=f+tFycm8Y7Ik3TmsrFpiz0Lh98/cbAr3MzFJkIF2J6Y=; b=DJ+jIc6GobMLcZi0R9rEGGNXPG9rdCi8cm9yJi1n+t7UZJzcbZEMKZhqnSawj+QLjL QbTnLlCpVSuGmWjlrps0QQzkhWDUEk2Hbc49/3dCIkjGI4ZDdL20Q0iU+/9r9154BvT8 wf2C9x5ZdqCl6a4a8Oy9fzR1n3ID2EQxLXtoEZBXnm4NZMnJ0j5g1/0FiFobXmrGx6mS qvwRgmv8CDrNHHEguWn9ODQhEP7w7PBzWQ2rujDWX7UHE7nkCUXFB9McXZ8z325+reiX tiqJbY4sKqzCoOGYcGd7xl+Ptw6EjHEI44584gYDc1E20hFtSeOyDiI92HQKsuVojUQP XEEg== X-Gm-Message-State: AOAM533Nkf2wX2EyovcTX+u5sSanzLh4Vvrv8ggBvsY1gQo5Idn5XWm4 3dxyO72RPibhhAJjmPmDv59wqafLmGCjK/wZ X-Google-Smtp-Source: ABdhPJwcvXCMqK1AosCMhVmqafYkaJkdghSAWCvgycK0toDTkQL8RypNjVnJqgs6ceyMEl7AmlWdPg== X-Received: by 2002:adf:bb0a:: with SMTP id r10mr9340156wrg.23.1633105086349; Fri, 01 Oct 2021 09:18:06 -0700 (PDT) Received: from localhost.localdomain (86-44-211-219-dynamic.agg2.lod.rsl-rtd.eircom.net. [86.44.211.219]) by smtp.googlemail.com with UTF8SMTPSA id d16sm7849358wmb.2.2021.10.01.09.18.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Oct 2021 09:18:05 -0700 (PDT) Subject: Re: bug#50940: how df utility displays sizes - GB vs GiB To: Danie de Jager , 50940@debbugs.gnu.org References: From: =?UTF-8?Q?P=c3=a1draig_Brady?= Message-ID: <377a161e-c0ed-ee25-2845-067ed175682a@draigBrady.com> Date: Fri, 1 Oct 2021 17:18:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Thunderbird/84.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 50940 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.6 (/) On 01/10/2021 14:28, Danie de Jager wrote: > Hi, > > The output from df -h and df -H is always G or M. Depending on who sends me > usage stats I have to ask how the command was run to make sure I calculate > usage correctly. Systems like Amazon EC2 use the explicit GiB suffix. > Making it easier to know what sizes you are looking at. > > Can a future release of df not be improved to print out the GB or GiB? So you're suggesting that `df -h` changes to using IEC suffixes like Gi, Ti etc. and -H would use the current suffix format to indicate SI units. That would be the right thing to do if we were adding these options now, but at this stage I'm not sure it's worth it, because you wouldn't be sure which version of df you were getting the output from. For completeness one can get unambiguous output using numfmt like: $ df -B1 | numfmt --field - --invalid=ignore --to=iec-i Filesystem 1B-blocks Used Available Use% Mounted on devtmpfs 3.9Gi 0 3.9Gi 0% /dev cheers, Pádraig From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 01 12:28:17 2021 Received: (at submit) by debbugs.gnu.org; 1 Oct 2021 16:28:17 +0000 Received: from localhost ([127.0.0.1]:57214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWLOP-0002l7-Tb for submit@debbugs.gnu.org; Fri, 01 Oct 2021 12:28:17 -0400 Received: from lists.gnu.org ([209.51.188.17]:40494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWLON-0002kk-Lm for submit@debbugs.gnu.org; Fri, 01 Oct 2021 12:28:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWLON-0000Q5-Df for bug-coreutils@gnu.org; Fri, 01 Oct 2021 12:28:11 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:42457) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWLOK-0001QM-74 for bug-coreutils@gnu.org; Fri, 01 Oct 2021 12:28:11 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id DF4D55C0178; Fri, 1 Oct 2021 12:28:05 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Fri, 01 Oct 2021 12:28:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zplane.com; h= date:from:to:cc:subject:message-id:reply-to:references :mime-version:content-type:in-reply-to; s=fm1; bh=6Cy7OCuusWeoMZ Tj6VYJ3mxXh791sCLxPZDn2l+GYKQ=; b=Xz/sZoSLQvrnwTvnG0GEOHm9t57Bw+ R/U3l3X7CJMeUa+CYB1ugl+lqmruRdPs3gnK5XcDdmzJuN3M+vs63sIGwzJ1QLl8 +pY0WilKHVa2AppMiLXrAq4qL4+xGxxgPTlhlMNnp+OR1H1EOTomDjHZMz21sOuo 8x2FcMsnOLjU8hlNGMf/7b+I8seNE1BYeVSJT8+hI6RWLNR2KNYkl7ZRKIVQH55o q3doQU4eGgyBnzTFJ6fLQ/TbU9HM2XlezPT18sUaTahzZrhfQ76AdcCCJTpor6+b hqV/vdQ+TUugfzaAtZWWxCI3A92/MCbmcrorkmLzlFILkd4T5UAo4HeQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:reply-to:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=6Cy7OCuusWeoMZTj6VYJ3mxXh791sCLxPZDn2l+GYKQ=; b=ea3gM3B0 OW8ep6954/frH4BhPaLdlukgn4NtdwuLOwChkQDhLCoMIw6pMGKLJGvvZGGFF7sm 0NaVmFiSiy19YPALtKtM4rFaOWShhPBKsxKiJdKI1cGL2KgPxTz7JvkUbFDkcByP pmesp78ZtFl97em0yGJOfV0HimZojgPxZxhhp0w7nwu6O3qaI6YAm5zbBLTS7sjO 8yqNy4G/UMHQbPA9bYoTy6wXz7+6T3KHP88Rb75MNmm8GNyButsSEXailwVFnSgT +s7VHOmuzfJIXaJfdL1QI7fnXdjbQpwLrNGjon4ZbS3xBf5jebN9Z14hLN4itemO CI4zAfqI2LgScQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudekiedgleeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhrfhggtggujggfsehttddttddtredvnecuhfhrohhmpefilhgv nhhnucfiohhluggvnhcuoehgughgseiiphhlrghnvgdrtghomheqnecuggftrfgrthhtvg hrnhephfdvteetgfetieehvdfgjeetgeeftdejieelvefhjeevudfhkeevjeeuueethfek necuffhomhgrihhnpehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhepghgughesiihplhgrnhgvrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 1 Oct 2021 12:28:05 -0400 (EDT) Received: by huh.zplane.com (Postfix, from userid 501) id A2F90638BD; Fri, 1 Oct 2021 10:28:04 -0600 (MDT) Date: Fri, 1 Oct 2021 10:28:04 -0600 From: Glenn Golden To: Danie de Jager Subject: Re: bug#50940: how df utility displays sizes - GB vs GiB Message-ID: <20211001162804.GA27654@huh.zplane.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Received-SPF: pass client-ip=66.111.4.26; envelope-from=gdg@zplane.com; helo=out2-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit Cc: bug-coreutils@gnu.org, 50940@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: gdg@zplane.com Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) Danie de Jager [2021-10-01 15:28:10 +0200]: > > The output from df -h and df -H is always G or M. Depending on who sends me > usage stats I have to ask how the command was run to make sure I calculate > usage correctly. Systems like Amazon EC2 use the explicit GiB suffix. > Making it easier to know what sizes you are looking at. > > Can a future release of df not be improved to print out the GB or GiB? > A patchset submitted last year https://lists.gnu.org/archive/html/coreutils/2020-09/msg00001.html would partially address this (for df, du, and ls) by consistently enforcing the semantics given in Section 2.3 of coreutils.info (8.32): If that patch were adopted, units suffixed with "B" (e.g. kB, MB, GB, etc.) would always imply base-2 units, and B-less suffixes (e.g. k, M, G) would always imply base-10 units, with no exceptions. ("iB" suffixes would not be used.) However, the overall issue is more complicated than this, because those semantics in Section 2.3 are directly contradicted by statements appearing elsewhere in 8.32 coreutils.info that invert the 2.3 semantics. See the above posting (and follow-ups in that thread) for all the gory details and historical background. NOTE: I do not know whether the program behavior and documentation described in the above post is still extant in coreutils release 9. Glenn Golden From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 01 12:33:24 2021 Received: (at 50940) by debbugs.gnu.org; 1 Oct 2021 16:33:24 +0000 Received: from localhost ([127.0.0.1]:57221 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWLTQ-0002ub-88 for submit@debbugs.gnu.org; Fri, 01 Oct 2021 12:33:24 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:57270) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWLTO-0002uN-RR for 50940@debbugs.gnu.org; Fri, 01 Oct 2021 12:33:23 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id D76D2160105; Fri, 1 Oct 2021 09:33:16 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id BXXgowgMMYCn; Fri, 1 Oct 2021 09:33:14 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 316DE160115; Fri, 1 Oct 2021 09:33:14 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id yjTzR1WGcMrZ; Fri, 1 Oct 2021 09:33:14 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 0E41A160105; Fri, 1 Oct 2021 09:33:14 -0700 (PDT) To: Danie de Jager References: From: Paul Eggert Organization: UCLA Computer Science Department Subject: Re: bug#50940: how df utility displays sizes - GB vs GiB Message-ID: <6e134c59-bea7-4777-05ae-80f5adda9642@cs.ucla.edu> Date: Fri, 1 Oct 2021 09:33:13 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 50940 Cc: 50940@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.4 (---) On 10/1/21 6:28 AM, Danie de Jager wrote: > Systems like Amazon EC2 use the explicit GiB suffix. Are you saying that Amazon EC2's 'df' utility behaves differently from=20 coreutils' 'df'? If so, could you send us documentation or source code=20 indicating exactly what Amazon EC2's 'df' does? As P=C3=A1draig wrote, there are compatibility arguments for 'df' to not=20 change its behavior here. As Glenn wrote, there was a longstanding issue with coreutils=20 documentation disagreeing with behavior. In=20 =20 Kamil Dudka suggested that the documentation be fixed; I don't know=20 whether that happened. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 01 16:37:28 2021 Received: (at submit) by debbugs.gnu.org; 1 Oct 2021 20:37:28 +0000 Received: from localhost ([127.0.0.1]:57463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWPHa-0000y1-Qa for submit@debbugs.gnu.org; Fri, 01 Oct 2021 16:37:28 -0400 Received: from lists.gnu.org ([209.51.188.17]:46424) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWPAz-0000n0-1z for submit@debbugs.gnu.org; Fri, 01 Oct 2021 16:30:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41164) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWPAy-0003xs-PR for bug-coreutils@gnu.org; Fri, 01 Oct 2021 16:30:36 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:46608) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWPAv-0002vf-Aj for bug-coreutils@gnu.org; Fri, 01 Oct 2021 16:30:36 -0400 Received: by mail-pf1-x42f.google.com with SMTP id u7so8918997pfg.13 for ; Fri, 01 Oct 2021 13:30:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=73GBZZSWmUUdemBi5y8WVDi1efDUoJH3WEviKQSw6Zs=; b=iGU4o6cID08AVhbIxgFooGwP/p1aMLPLuyt+ElOpUBLVscgqhHgb+u+mLFs5nFSCgk Vttz2K5h4iMkz5XnuIOq7NKH1COFXiJQGiEfb0k+8D5uM42pEnIf6lHtnFEHIdwAHvqy khopPCTuGTvajN3LOFCRHvZEDqH/qBJrcaTJYJ+DgYzYMGoeOeQVfqZoAW/yYiRU6CCt 925UuTg74YJPiK2bun5Vy8obn4JGQZAGlPRJFztFZqIbMyYa/AWCGHxSLjwUuPeeu8iL k9eOPeSg+aUWu9WhHgSRHqCgvkjVzYewm9tdaiKRx9Jew+vAu35wWuU0ZCurjTIvV8pj tyjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=73GBZZSWmUUdemBi5y8WVDi1efDUoJH3WEviKQSw6Zs=; b=GZB0EPtRwn4EaGyDGV3j/wrTcXeiDEcNQmovieEZ/2KaMjLepfgHD/MntWFkvPfXlF WhAOy/taiyz5yohZpGPZmE8C8OWfS14iZMVKqZmSI8fEmETAPfKi/oq+SBs6OC15JU/P TIUnrSAvAGCB6IJuSKlDMuoKlt4ELvLvmQcNqiaj47Ko0eOy2PLG+a+tNXytI0lDPVro CbOUNFsOzWuDjOM5U1vL9jcF1orvEcdv4GFPeeowALgPEAGHDxN37XI9RbHEiGwjKKoU 8EbbAoM8Q++5KlSvpZMJrbL92scgZwjSdQlNvfaudWJZVunvcDizhk+KjePjFo2gUoTx +4Ww== X-Gm-Message-State: AOAM532+11dnlD2jmN9/tIuqIWcfHYg0TRTr6Z8B39tn944Pb2dTbiAe keJjwLTgaF7wLAlyCE7AMf3Y0uW4NWpwNaKqYzPeygSLpXmJ7g== X-Google-Smtp-Source: ABdhPJx3iKR3IVCr71QYXO7C14HJCwlIDv3Zj3mOEC3R91ZZODVQZQFpn75MOhRHk7SpJOPNUzXSPBaWOpN0D1dq1QA= X-Received: by 2002:a62:1610:0:b0:447:53fa:a27 with SMTP id 16-20020a621610000000b0044753fa0a27mr12272809pfw.39.1633120230192; Fri, 01 Oct 2021 13:30:30 -0700 (PDT) MIME-Version: 1.0 References: <20211001162804.GA27654@huh.zplane.com> In-Reply-To: <20211001162804.GA27654@huh.zplane.com> From: Danie de Jager Date: Fri, 1 Oct 2021 22:30:19 +0200 Message-ID: Subject: Re: bug#50940: how df utility displays sizes - GB vs GiB To: bug-coreutils@gnu.org Content-Type: multipart/alternative; boundary="000000000000323b1705cd506f26" Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=danie.dejager@gmail.com; helo=mail-pf1-x42f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 01 Oct 2021 16:37:25 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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 (--) --000000000000323b1705cd506f26 Content-Type: text/plain; charset="UTF-8" Thank you for sharing. After reading I agree that changing existing features could break processes for users. It would be easy to make mistakes when in a hurry and looking at the following output: $ df -h | grep /$ /dev/nvme0n1p1 12G 8.5G 3.6G 71% / $ df -H | grep /$ /dev/nvme0n1p1 13G 9.1G 3.8G 71% / I'm happy with the calculations done but as stated in the path set mentioned I would've preferred if the output was: $ df -h | grep /$ /dev/nvme0n1p1 12GiB 8.5GiB 3.6GiB 71% / $ df -H | grep /$ /dev/nvme0n1p1 13GB 9.1GB 3.8GB 71% / I propose that the options -h and -H not be changed, for compatibility, but that it becomes possible to make a distinction between the two formats outputs. Can we use the same options, but to trigger the longer annotation, we double the characters used to -hh and -HH? therefore $ df -hh | grep /$ /dev/nvme0n1p1 12GiB 8.5GiB 3.6GiB 71% / $ df -HH | grep /$ /dev/nvme0n1p1 13GB 9.1GB 3.8GB 71% / or for ls ls -lhh *.crt -rw-r--r--. 1 danie.dejager danie.dejager 2.6KB Sep 29 13:07 1.crt Regards, Danie On Fri, 1 Oct 2021 at 18:28, Glenn Golden wrote: > > A patchset submitted last year > > https://lists.gnu.org/archive/html/coreutils/2020-09/msg00001.html > > would partially address this (for df, du, and ls) by consistently enforcing > the semantics given in Section 2.3 of coreutils.info (8.32): If that patch > were adopted, units suffixed with "B" (e.g. kB, MB, GB, etc.) would always > imply base-2 units, and B-less suffixes (e.g. k, M, G) would always imply > base-10 units, with no exceptions. ("iB" suffixes would not be used.) > > However, the overall issue is more complicated than this, because those > semantics in Section 2.3 are directly contradicted by statements appearing > elsewhere in 8.32 coreutils.info that invert the 2.3 semantics. > > See the above posting (and follow-ups in that thread) for all the gory > details and historical background. > > NOTE: I do not know whether the program behavior and documentation > described > in the above post is still extant in coreutils release 9. > > Glenn Golden > --000000000000323b1705cd506f26 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you for sharing. After reading I agree that cha= nging existing=C2=A0features could break processes for users.
It would be easy to make mistakes when in a hurry and looking a= t the following output:
$ df -h | grep /$
/dev/nvme0n1p1 =C2= =A0 12G =C2=A08.5G =C2=A03.6G =C2=A071% /

$ df= -H | grep /$
/dev/nvme0n1p1 =C2=A0 13G =C2=A09.1G =C2=A03.8G =C2=A071% = /

I'm happy with the calculations done but= as stated in the path set mentioned I would've preferred=C2=A0if the o= utput was:
$ df -h | grep /$
/dev/nvme0n1p1 = =C2=A0 12GiB=C2=A0 8.5GiB=C2=A0=C2=A03.6GiB=C2=A0=C2=A0 71% /

$ df -H | grep /$
/dev/nvme0n1p1 =C2=A0 13GB=C2=A0 9.1GB= =C2=A0 3.8GB=C2=A0 71% /

I propose that the = options -h and -H not be changed, for compatibility, but that it becomes po= ssible to make a distinction between the two formats outputs.
Can we use the same options, but to trigger the longer annotati= on, we double=C2=A0the characters=C2=A0used to -hh and -HH?

<= /div>
therefore
$ df -hh | grep /$
/d= ev/nvme0n1p1 =C2=A0 12GiB=C2=A0 8.5GiB=C2=A0=C2=A03.6GiB=C2=A0=C2=A0 71% /<= /div>
$ df -HH | grep /$
/dev/nvme0n1p1 =C2=A0 13GB=C2= =A0 9.1GB=C2=A0 3.8GB=C2=A0 71% /

or for ls

ls -lhh *.crt
-rw-r--r--. 1 danie.dejager danie.d= ejager 2.6KB Sep 29 13:07 1.crt

Regards,
=
Danie

On Fri, 1 Oct 2021 at 18:28, Glenn Golden <gdg@zplane.com> wrote:

A patchset submitted last year

=C2=A0 =C2=A0 https://lists.gnu.or= g/archive/html/coreutils/2020-09/msg00001.html

would partially address this (for df, du, and ls) by consistently enforcing=
the semantics given in Section 2.3 of coreutils.info (8.32): If that patch<= br> were adopted, units suffixed with "B" (e.g. kB, MB, GB, etc.) wou= ld always
imply base-2 units, and B-less suffixes (e.g. k, M, G) would always imply base-10 units, with no exceptions. ("iB" suffixes would not be us= ed.)

However, the overall issue is more complicated than this, because those
semantics in Section 2.3 are directly contradicted by statements appearing<= br> elsewhere in 8.32 coreutils.info that invert the 2.3 semantics.

See the above posting (and follow-ups in that thread) for all the gory
details and historical background.

NOTE: I do not know whether the program behavior and documentation describe= d
in the above post is still extant in coreutils release 9.

Glenn Golden
--000000000000323b1705cd506f26-- From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 01 17:01:25 2021 Received: (at 50940) by debbugs.gnu.org; 1 Oct 2021 21:01:25 +0000 Received: from localhost ([127.0.0.1]:57482 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWPen-0001dK-8L for submit@debbugs.gnu.org; Fri, 01 Oct 2021 17:01:25 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:56754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWPej-0001d3-LZ for 50940@debbugs.gnu.org; Fri, 01 Oct 2021 17:01:23 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 75CFA160106; Fri, 1 Oct 2021 14:01:15 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id KrZ3K71zGEXB; Fri, 1 Oct 2021 14:01:14 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id C8850160119; Fri, 1 Oct 2021 14:01:14 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 6PHKcohvdiVs; Fri, 1 Oct 2021 14:01:14 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id A6E77160106; Fri, 1 Oct 2021 14:01:14 -0700 (PDT) To: Danie de Jager , 50940@debbugs.gnu.org References: <20211001162804.GA27654@huh.zplane.com> From: Paul Eggert Organization: UCLA Computer Science Department Subject: Re: bug#50940: how df utility displays sizes - GB vs GiB Message-ID: Date: Fri, 1 Oct 2021 14:01:14 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 50940 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.4 (---) On 10/1/21 1:30 PM, Danie de Jager wrote: > Can we use the same options, but to trigger the longer annotation, we > double the characters used to -hh and -HH? Interesting idea. Normally, later options override earlier, so 'df -h=20 -H' is equivalent to 'df -H'. This is so that one can alias 'df' to 'df=20 -h' and then type plain 'df' to get the same behavior as 'df -h', while=20 being able to type 'df -H' to get the other behavior. With that in mind=20 if we made the change you suggest, such an alias would mean that if you=20 typed 'df' you would get the behavior of ordinary 'df -h' while if you=20 typed 'df -h' you'd get the behavior of ordinary 'df -hh'. So there=20 might be an opportunity for confusion there. We could of course use a different option letter (unfortunately -B is=20 already taken...). From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 01 17:16:36 2021 Received: (at 50940) by debbugs.gnu.org; 1 Oct 2021 21:16:36 +0000 Received: from localhost ([127.0.0.1]:57491 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWPtT-0001zo-VJ for submit@debbugs.gnu.org; Fri, 01 Oct 2021 17:16:36 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:32877) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWPtQ-0001zZ-OW for 50940@debbugs.gnu.org; Fri, 01 Oct 2021 17:16:34 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 1D1525C01B1; Fri, 1 Oct 2021 17:16:27 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Fri, 01 Oct 2021 17:16:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zplane.com; h= date:from:to:cc:subject:message-id:reply-to:references :mime-version:content-type:in-reply-to; s=fm1; bh=GvD5/FFPxtk+vJ XFZ+fzEz6Dxae4IcZw39f/SQyyG9E=; b=pC5dA6ieBqDrGR8yB4QiDQNmr7s0Wf zx5RnAYEFH9fdXqo9V4gJAMpXHWaj+UWoCrK3Hw4e1U8xhjW2m36EWWBDrkIpibT Yz7GylvhcjBeJMfJMfnB0HADwnBgji1tWr9ey+1SUiH/BqQo5xbRKyCPDQWbwPYV wSdIj98dnTOhJE2rtGoNDgh4IbQbBt4DQzFuzDRc6FRdPXShK6E4M4TZ/2asU04A Tnxp3/HKbeVjzQYX8CWL3hFWwzXzVtbcYoCsyaDeRrWzY1EjHovOrcy2JHr83fUZ iAhXhsespo5xZBRJcyiG0hAC56ER0I1is4j6fe/5MG3besdo0z81Z8gA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:reply-to:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=GvD5/FFPxtk+vJXFZ+fzEz6Dxae4IcZw39f/SQyyG9E=; b=FtiSsjOZ QuqJ2B2Ifggd3M306a3wW4ggNm3ASoyoZ8pLKa0UBipZvehgrKB62Dxe53p67kEQ WnflGK8lMJjmpnETv0kKvjJKt+jKiSDNyP+QnT7Oc+dbkmEn+cTuEtltiwb/t0zM dErGBrAq/XFjbCFfGb1S+/c450FO6WIOwzeFA+XyIZ3kIsxYLj2A02wMyu60OTP2 +tassBlJrx3KQIUuGmCJDXp5J3mn7qTXLQWP1HcVQaEk7LCiSyOjMafuYeDb6mGv 2khxubk3eUG+CuI1Jco4UbpdBg/AxOFlVTXROeH1SluE1IwslGwMarGqtTl+8Quf cRf+6Dve/fm2Qw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudekiedgudehhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkrhhfgggtuggjfgesthdttddttdervdenucfhrhhomhepifhl vghnnhcuifholhguvghnuceoghgughesiihplhgrnhgvrdgtohhmqeenucggtffrrghtth gvrhhnpeefhfevffeghfeitedukeehiefhfffhfffgteeigeeugfejhfevffehgfefudeg ueenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgug hgseiiphhlrghnvgdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 1 Oct 2021 17:16:26 -0400 (EDT) Received: by huh.zplane.com (Postfix, from userid 501) id 68FCF638BD; Fri, 1 Oct 2021 15:16:24 -0600 (MDT) Date: Fri, 1 Oct 2021 15:16:24 -0600 From: Glenn Golden To: Paul Eggert Subject: Re: bug#50940: how df utility displays sizes - GB vs GiB Message-ID: <20211001211624.GI1312@huh.zplane.com> References: <20211001162804.GA27654@huh.zplane.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50940 Cc: Danie de Jager , 50940@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: gdg@zplane.com Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Paul Eggert [2021-10-01 14:01:14 -0700]: > > On 10/1/21 1:30 PM, Danie de Jager wrote: > > Can we use the same options, but to trigger the longer annotation, we > > double the characters used to -hh and -HH? > > Interesting idea. Normally, later options override earlier, so 'df -h -H' is > equivalent to 'df -H'. This is so that one can alias 'df' to 'df -h' and > then type plain 'df' to get the same behavior as 'df -h', while being able > to type 'df -H' to get the other behavior. With that in mind if we made the > change you suggest, such an alias would mean that if you typed 'df' you > would get the behavior of ordinary 'df -h' while if you typed 'df -h' you'd > get the behavior of ordinary 'df -hh'. So there might be an opportunity for > confusion there. > > We could of course use a different option letter (unfortunately -B is > already taken...). > Might it be possible to finesse the already existing envars (BLOCK_SIZE, DF_BLOCK_SIZE, etc.) to accomplish the desired suffixing mods? Or perhaps even a new envar(s) dedicated to simply specifying the suffixing, and defaulting to present behavior for backcompat...? Haven't thought this thru, just tossing it out as a possibility to think on. Might be cleaner in some respects than trying to wedge it into the options. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 01 17:26:34 2021 Received: (at 50940) by debbugs.gnu.org; 1 Oct 2021 21:26:34 +0000 Received: from localhost ([127.0.0.1]:57506 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWQ38-0002EN-HH for submit@debbugs.gnu.org; Fri, 01 Oct 2021 17:26:34 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:33970) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWQ35-0002E7-OS for 50940@debbugs.gnu.org; Fri, 01 Oct 2021 17:26:32 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 7B516160060; Fri, 1 Oct 2021 14:26:25 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 0ErZ2JW_7sBv; Fri, 1 Oct 2021 14:26:24 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id D9A88160106; Fri, 1 Oct 2021 14:26:24 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id m5yaIJu_upWc; Fri, 1 Oct 2021 14:26:24 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id B3AC3160060; Fri, 1 Oct 2021 14:26:24 -0700 (PDT) Subject: Re: bug#50940: how df utility displays sizes - GB vs GiB To: gdg@zplane.com References: <20211001162804.GA27654@huh.zplane.com> <20211001211624.GI1312@huh.zplane.com> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <397356ba-5175-2e94-863f-4e4c647994a6@cs.ucla.edu> Date: Fri, 1 Oct 2021 14:26:24 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20211001211624.GI1312@huh.zplane.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 50940 Cc: Danie de Jager , 50940@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.4 (---) On 10/1/21 2:16 PM, Glenn Golden wrote: > Might it be possible to finesse the already existing envars (BLOCK_SIZE, > DF_BLOCK_SIZE, etc.) to accomplish the desired suffixing mods? We've been moving away from using those environment variables, for security and reproducibility reasons. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 04 15:39:12 2021 Received: (at 50940) by debbugs.gnu.org; 4 Oct 2021 19:39:12 +0000 Received: from localhost ([127.0.0.1]:38413 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXTns-0001A0-Bf for submit@debbugs.gnu.org; Mon, 04 Oct 2021 15:39:12 -0400 Received: from mail-pf1-f170.google.com ([209.85.210.170]:40682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXTnq-00019m-Kf for 50940@debbugs.gnu.org; Mon, 04 Oct 2021 15:39:11 -0400 Received: by mail-pf1-f170.google.com with SMTP id m5so2676016pfk.7 for <50940@debbugs.gnu.org>; Mon, 04 Oct 2021 12:39:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SS1mC3zsyntl4fBwdaPxdZSIYtWxC4oXjldzqPQZMoA=; b=jQTPCSldgxsmyZ4Z6BGrC86dHRsDOrXrMFfXLzEEQMOpFyDoEretmaLhk9tG7ew8v5 BlihW7uBVonmWMBGVK8Q+YLCxRB0REujcrd3VdAqFHMhAHJ+X10pbfsCXliUjiOOKtEY cKn/vhxSM/br/BaN8Mz4Twpg1qh8wuE9TYOCOoiOvd4esbYKFp/hXNxJcvngXttxbW6F ew918rTVs1YeMpwURNPK7+ExZKpOIXGNncT76VnQnSBYFWMCSn2GWs73C+YljIOLIzoI EdbSv9H9l5UHTFOkbe3fuJf9tElAfUG1S8DoNqr9+z/yKA3v37ljAtOPtQZbE8SFfI5C 9LBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SS1mC3zsyntl4fBwdaPxdZSIYtWxC4oXjldzqPQZMoA=; b=s7eD25KC16Hua8ce32ct3X3Cg+FUa5Ir8PHwhZlmksSFBF4x7SedrEEEajEuPiJ0dL 2HKF/MfKfQHOzDSMv4WIQWVslC33SoT1Tw4WjeakgT5JLLFkvYW8hEf3dlubIMBKo2tp jFG7XMdZ4dX5Cd7DN8k953tfsCGtuEKQ5ypmGngAwnnqsZKTiCJW2e6ZFBg8+dWLaOG8 k8fdHUwQnC0HamNbjHv5g1Z+JVPmrtlqZbMlAbG9u47rCv9sheM4788cEInpATLTtD+g F3Mrr+WLKIRQ99ZAxwD03cqJPNl/foS17+X1OEEYibc5Gn27KPHphPjShFn3Fl3XBtxS u7Ug== X-Gm-Message-State: AOAM530Nwof1jCeLxZvlXRSfvLLhr3HLMgoDNzjF+WSEtHLfZalLvgw0 pX4toYqkA2Q4yRYfA8Dzjw2ZvWICnkEtZgSUbO8= X-Google-Smtp-Source: ABdhPJymPXiri7oUv+AdX4ll/1ftXdiTOn3YkMsvJy3otPeNHWNydtd25QBRs3Vv05K/b6Rh5CK/Q1RRIe759+8WOKg= X-Received: by 2002:a63:b04c:: with SMTP id z12mr12178748pgo.371.1633376344581; Mon, 04 Oct 2021 12:39:04 -0700 (PDT) MIME-Version: 1.0 References: <20211001162804.GA27654@huh.zplane.com> In-Reply-To: From: Danie de Jager Date: Mon, 4 Oct 2021 21:38:52 +0200 Message-ID: Subject: Re: bug#50940: how df utility displays sizes - GB vs GiB To: Paul Eggert Content-Type: multipart/alternative; boundary="000000000000cdaa9e05cd8c105a" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 50940 Cc: 50940@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) --000000000000cdaa9e05cd8c105a Content-Type: text/plain; charset="UTF-8" Hi Paul, Thanks for your consideration. I understand your concern about causing confusion with set aliases. In that case I agree, create a new option instead. Regards, Danie On Fri, 1 Oct 2021 at 23:01, Paul Eggert wrote: > On 10/1/21 1:30 PM, Danie de Jager wrote: > > Can we use the same options, but to trigger the longer annotation, we > > double the characters used to -hh and -HH? > > Interesting idea. Normally, later options override earlier, so 'df -h > -H' is equivalent to 'df -H'. This is so that one can alias 'df' to 'df > -h' and then type plain 'df' to get the same behavior as 'df -h', while > being able to type 'df -H' to get the other behavior. With that in mind > if we made the change you suggest, such an alias would mean that if you > typed 'df' you would get the behavior of ordinary 'df -h' while if you > typed 'df -h' you'd get the behavior of ordinary 'df -hh'. So there > might be an opportunity for confusion there. > > We could of course use a different option letter (unfortunately -B is > already taken...). > --000000000000cdaa9e05cd8c105a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Paul,

Thanks for your con= sideration. I understand your concern about causing confusion with set alia= ses. In that case I agree, create a new option instead.

Regards,
Danie

On Fri, 1 Oct 2021 at 23:01, Paul = Eggert <eggert@cs.ucla.edu>= wrote:
On 10/1/= 21 1:30 PM, Danie de Jager wrote:
> Can we use the same options, but to trigger the longer annotation, we<= br> > double the characters used to -hh and -HH?

Interesting idea. Normally, later options override earlier, so 'df -h <= br> -H' is equivalent to 'df -H'. This is so that one can alias = 9;df' to 'df
-h' and then type plain 'df' to get the same behavior as 'd= f -h', while
being able to type 'df -H' to get the other behavior. With that in = mind
if we made the change you suggest, such an alias would mean that if you typed 'df' you would get the behavior of ordinary 'df -h' w= hile if you
typed 'df -h' you'd get the behavior of ordinary 'df -hh= 9;. So there
might be an opportunity for confusion there.

We could of course use a different option letter (unfortunately -B is
already taken...).
--000000000000cdaa9e05cd8c105a-- From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 04 16:32:10 2021 Received: (at 50940) by debbugs.gnu.org; 4 Oct 2021 20:32:10 +0000 Received: from localhost ([127.0.0.1]:38460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXUd8-0002To-3W for submit@debbugs.gnu.org; Mon, 04 Oct 2021 16:32:10 -0400 Received: from mail-yb1-f171.google.com ([209.85.219.171]:43613) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXUd5-0002TT-Kw for 50940@debbugs.gnu.org; Mon, 04 Oct 2021 16:32:09 -0400 Received: by mail-yb1-f171.google.com with SMTP id r1so40578699ybo.10 for <50940@debbugs.gnu.org>; Mon, 04 Oct 2021 13:32:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=colorremedies-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=D/UMKeWxrv745/sgHc4QUPb8xZdWBTyjL4AoMjvGNYs=; b=1vIytaxwDBFrKD1xvoKZquKIf8JwsXtEY75+1UvugjP/0p+RALIJzBMoAN25iM7cYN 9CB1kWXH5R2eQz85dvcPlj5srO6q9SLV3oRlTiKGxwV7IfFK5JGluPYEq/yWg1LqLjvh /cWoD98yIn6fhgRTcGxZaLF8Fr89mcnnQ8FOyGFDyxxmnM7p6MklHs1uIaSFrFFsE01k 96SaiV/V6f6S8cKelHoJmiiVeMuuDUAWgEwrcSfFRX32u27lGQL0hI/gmM0QF5XbpC3Y i0CMkUPWjl/A7ClPQARm14ofW9Iy+x9jrglNS1Xlk+uFAQNa6zmLyuOpMw4IKK7HOTbx FVcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=D/UMKeWxrv745/sgHc4QUPb8xZdWBTyjL4AoMjvGNYs=; b=sO2n/k2vW1lJEJuhcnVAbffeTE01T2mFiMOTq7y6c2c7hTCjeL7D24X0I38Oj0RRnO pk0gbvetubp+a/F+gsyAjs/4TdX5cbPo2n4c38TxrEegre1awySWTGB04rlzzttUi172 2Pk0EgnhsZ7/WKTUkgRYodI0zAlPyMPW8Chlnu8fizSYm6S/a2r+tILwClOoA3Pfwiml 1u/qynhmpcQadn77WqWBbORt/sTwhfpcZfN/l0GaRutppQWPiwnhYL4smY2erVQUBRf5 rt/r/tc1xV6YZjXXiGVb00ZYIh9mim0FOLoCGviwHPhFkdnQGCTP3juyPMFbcbS+lTp0 Ickw== X-Gm-Message-State: AOAM530PMkDAesP1gM+YSXq30OL6WEOzz2MiGaph13TFK+bDUzgFjUk5 RAOlPNZ1ayH2KdzAF5FyrTl7nxNjvHAEOaS81G2XOw== X-Google-Smtp-Source: ABdhPJyt2NOz1E+qGgnJvlxKcc6CflTXCTtHCSgroIWqfeph+X4AR3Pjfelg3WSsv1XCZnvv9T/85l/VbxOKXas2QeE= X-Received: by 2002:a25:1e8a:: with SMTP id e132mr15710728ybe.437.1633379522035; Mon, 04 Oct 2021 13:32:02 -0700 (PDT) MIME-Version: 1.0 References: <377a161e-c0ed-ee25-2845-067ed175682a@draigBrady.com> In-Reply-To: <377a161e-c0ed-ee25-2845-067ed175682a@draigBrady.com> From: Chris Murphy Date: Mon, 4 Oct 2021 16:31:46 -0400 Message-ID: Subject: Re: bug#50940: how df utility displays sizes - GB vs GiB To: =?UTF-8?Q?P=C3=A1draig_Brady?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 50940 Cc: Danie de Jager , 50940@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) On Fri, Oct 1, 2021 at 12:19 PM P=C3=A1draig Brady wrote= : > > On 01/10/2021 14:28, Danie de Jager wrote: > > Hi, > > > > The output from df -h and df -H is always G or M. Depending on who send= s me > > usage stats I have to ask how the command was run to make sure I calcul= ate > > usage correctly. Systems like Amazon EC2 use the explicit GiB suffix. > > Making it easier to know what sizes you are looking at. > > > > Can a future release of df not be improved to print out the GB or GiB? > > So you're suggesting that `df -h` changes to using IEC suffixes like Gi, = Ti etc. > and -H would use the current suffix format to indicate SI units. > That would be the right thing to do if we were adding these options now, > but at this stage I'm not sure it's worth it, because you wouldn't > be sure which version of df you were getting the output from. > > For completeness one can get unambiguous output using numfmt like: > > $ df -B1 | numfmt --field - --invalid=3Dignore --to=3Diec-i > Filesystem 1B-blocks Used Available Use% Mounted on > devtmpfs 3.9Gi 0 3.9Gi 0% /dev I'm pretty biased toward showing units correctly, no matter the ensuing compatibility arguments. The distillation of the compatibility argument is: changing this will be painful for scripts. While true, it's still worse to have the wrong units reported. Is the primary target audience for human-readable values humans? Or scripts? If it's really such a problem, introduce a computer/script friendly output format and only ever append to the output when introducing new values. --=20 Chris Murphy From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 04 16:42:24 2021 Received: (at 50940) by debbugs.gnu.org; 4 Oct 2021 20:42:24 +0000 Received: from localhost ([127.0.0.1]:38464 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXUn2-0002jt-3L for submit@debbugs.gnu.org; Mon, 04 Oct 2021 16:42:24 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:51444) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXUmz-0002jc-3D for 50940@debbugs.gnu.org; Mon, 04 Oct 2021 16:42:23 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 74DE31600EA; Mon, 4 Oct 2021 13:42:14 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id vMZBcPbwwVLU; Mon, 4 Oct 2021 13:42:13 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id D331016010F; Mon, 4 Oct 2021 13:42:13 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id N-VOWon_nzWD; Mon, 4 Oct 2021 13:42:13 -0700 (PDT) Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 7FC5E1600EA; Mon, 4 Oct 2021 13:42:13 -0700 (PDT) Message-ID: <5d6b89cb-dc5b-60ab-d2cb-5497ae3b127e@cs.ucla.edu> Date: Mon, 4 Oct 2021 13:42:13 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: bug#50940: how df utility displays sizes - GB vs GiB Content-Language: en-US To: Chris Murphy , =?UTF-8?Q?P=c3=a1draig_Brady?= References: <377a161e-c0ed-ee25-2845-067ed175682a@draigBrady.com> From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 50940 Cc: Danie de Jager , 50940@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.4 (---) On 10/4/21 13:31, Chris Murphy wrote: > Is the primary > target audience for human-readable values humans? Or scripts Both. Output columns are at a premium, so there is some advantage to omitting the units suffix (plus a lot of tradition for omission, outside of coreutils). From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 21 04:54:09 2022 Received: (at control) by debbugs.gnu.org; 21 Feb 2022 09:54:09 +0000 Received: from localhost ([127.0.0.1]:35089 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nM5OS-0004QH-Uo for submit@debbugs.gnu.org; Mon, 21 Feb 2022 04:54:09 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:50062) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nM5OQ-0004Pl-HA for control@debbugs.gnu.org; Mon, 21 Feb 2022 04:54:07 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 47F4C160103 for ; Mon, 21 Feb 2022 01:54:00 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id EeoF-J7Yq3VB for ; Mon, 21 Feb 2022 01:53:59 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 80CD2160106 for ; Mon, 21 Feb 2022 01:53:59 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id G3xxhhAF1RK9 for ; Mon, 21 Feb 2022 01:53:59 -0800 (PST) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 60C33160103 for ; Mon, 21 Feb 2022 01:53:59 -0800 (PST) Message-ID: <302e53e9-8f10-b82c-6824-9ccec177df8d@cs.ucla.edu> Date: Mon, 21 Feb 2022 01:53:59 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US To: control@debbugs.gnu.org From: Paul Eggert Organization: UCLA Computer Science Department Subject: coreutils bug reports Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) severity 47701 wishlist severity 53145 wishlist severity 50940 wishlist severity 49679 wishlist severity 49428 wishlist severity 47701 wishlist severity 47700 wishlist severity 47380 wishlist severity 47243 wishlist tags 47151 wontfix