From unknown Sun Jun 22 17:10:49 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#17546 <17546@debbugs.gnu.org> To: bug#17546 <17546@debbugs.gnu.org> Subject: Status: Problem with du Reply-To: bug#17546 <17546@debbugs.gnu.org> Date: Mon, 23 Jun 2025 00:10:49 +0000 retitle 17546 Problem with du reassign 17546 coreutils submitter 17546 worley@alum.mit.edu (Dale R. Worley) severity 17546 normal tag 17546 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Wed May 21 20:17:14 2014 Received: (at submit) by debbugs.gnu.org; 22 May 2014 00:17:14 +0000 Received: from localhost ([127.0.0.1]:55673 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WnGh7-0000jR-Ni for submit@debbugs.gnu.org; Wed, 21 May 2014 20:17:14 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51360) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WnGh5-0000jB-4t for submit@debbugs.gnu.org; Wed, 21 May 2014 20:17:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WnGgs-0000wp-7F for submit@debbugs.gnu.org; Wed, 21 May 2014 20:17:05 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:43881) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnGgs-0000wi-4i for submit@debbugs.gnu.org; Wed, 21 May 2014 20:16:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52934) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnGgl-00069t-97 for bug-coreutils@gnu.org; Wed, 21 May 2014 20:16:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WnGge-0000pF-5u for bug-coreutils@gnu.org; Wed, 21 May 2014 20:16:51 -0400 Received: from qmta12.westchester.pa.mail.comcast.net ([76.96.59.227]:55598) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnGge-0000ls-1X for bug-coreutils@gnu.org; Wed, 21 May 2014 20:16:44 -0400 Received: from omta21.westchester.pa.mail.comcast.net ([76.96.62.72]) by qmta12.westchester.pa.mail.comcast.net with comcast id 4nFq1o0041ZXKqc5CoGbf8; Thu, 22 May 2014 00:16:35 +0000 Received: from hobgoblin.ariadne.com ([24.34.72.61]) by omta21.westchester.pa.mail.comcast.net with comcast id 4oGa1o00Z1KKtkw3hoGbBY; Thu, 22 May 2014 00:16:35 +0000 Received: from hobgoblin.ariadne.com (hobgoblin.ariadne.com [127.0.0.1]) by hobgoblin.ariadne.com (8.14.7/8.14.7) with ESMTP id s4M0GXSZ025248; Wed, 21 May 2014 20:16:33 -0400 Received: (from worley@localhost) by hobgoblin.ariadne.com (8.14.7/8.14.7/Submit) id s4M0GX0b025247; Wed, 21 May 2014 20:16:33 -0400 Date: Wed, 21 May 2014 20:16:33 -0400 Message-Id: <201405220016.s4M0GX0b025247@hobgoblin.ariadne.com> From: worley@alum.mit.edu (Dale R. Worley) To: bug-coreutils@gnu.org Subject: Problem with du DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1400717795; bh=zNU147pKN+urNQz1rLKu/t2X5A9prY3EEp457CA6tsg=; h=Received:Received:Received:Received:Date:Message-Id:From:To: Subject; b=Ba5J3weGUfuffIN1e18W3C42jmnYZztYCMV55tsG7jVZPB3NMUA0qDLVR+xxuPR/S zp1/XWfV6p1A9QKtbxglrrR4pA9XwiM3lc/CmlVHav4DVvGht0eZNw4u8UG3Zw7+r6 Og8r25yHK29pixtJdbLNLID1aUbw5xgs9qZs/bSoHOtH7bVugr5zRRzWqE1S6OU7yx JVFRZio12IM4u7hLl0gW0qKEAhLYQ3+YvVXUljKN7Jo98HnXJDwjeg2/vS0hbtqQ3o iL2nuEGVEC6zHIScqwu+sA+n5ADm5tR4+1jeOiGoRv7Zpept54uB3DSTUks/ChFhO7 2NlEnqVm0zqwQ== X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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: -5.0 (-----) X-Debbugs-Envelope-To: submit 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 message is a sequel to the message copied below. There is a somewhat subtle problem with how du "never counts the same file twice". This behavior is what one would expect by default when du is processing the directory tree which is a single argument, but it's *not* the behavior that I expect when processing two arguments. In particular, if one file is part of two argument directory trees, du will count its space as space within the first argument, but not within any later argument that contains it. This leads to startlingly odd behaviors, such as the order of the arguments to du will change the resulting output, and the output of du when applied to two arguments is not the concatenation of the outputs of two executions of du, one with each argument. It seems to me that the correct behavior (giving what people expect) is to clear the "hard link cache" between processing each argument, so that if argument trees overlap, the overlapped part is counted properly in each argument. Given that before release 8.6, the order of arguments didn't matter, it seems to me to be unlikely that many users are specifically depending on caching between arguments. (Please include my address in any responses.) Thanks, Dale http://lists.gnu.org/archive/html/bug-coreutils/2010-11/msg00176.html > From: Paul Eggert > Subject: bug#7439: du failing at "du -sh . *" > Date: Fri, 19 Nov 2010 08:52:39 -0800 > > On 11/18/2010 05:08 PM, Mathias Linnemann-Emden wrote: > > So not only the output of "du -sh . *" is wrong (not showing du for *), > > but also the output of "du -sh * ." is incorrect (showing only 4K > > instead of 8K for "."). > > NEWS lists this as a bug fix in release 8.6: > > du no longer multiply counts a file that is a directory or whose > link count is 1, even if the file is reached multiple times by > following symlinks or via multiple arguments. > > The idea is that a single invocation of du never counts the same > file twice. This was always true for files with multiple hard > links (you probably didn't notice that), and now it's consistent > for all files. > > To get something like the old behavior, you can use "du -l", > or invoke "du" separately for each file (depending on how you > want hard links treated). From debbugs-submit-bounces@debbugs.gnu.org Wed May 21 22:42:35 2014 Received: (at 17546) by debbugs.gnu.org; 22 May 2014 02:42:35 +0000 Received: from localhost ([127.0.0.1]:55738 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WnIxm-0006Pn-Ka for submit@debbugs.gnu.org; Wed, 21 May 2014 22:42:35 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:42501) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WnIxi-0006PT-39 for 17546@debbugs.gnu.org; Wed, 21 May 2014 22:42:31 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id BB869A6002C; Wed, 21 May 2014 19:42:23 -0700 (PDT) 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 RAHW9mNUEnMC; Wed, 21 May 2014 19:42:15 -0700 (PDT) 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 2CBC6A6001E; Wed, 21 May 2014 19:42:15 -0700 (PDT) Message-ID: <537D6403.5050300@cs.ucla.edu> Date: Wed, 21 May 2014 19:42:11 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: "Dale R. Worley" Subject: Re: bug#17546: Problem with du References: <201405220016.s4M0GX0b025247@hobgoblin.ariadne.com> In-Reply-To: <201405220016.s4M0GX0b025247@hobgoblin.ariadne.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 17546 Cc: 17546@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: -3.0 (---) Dale R. Worley wrote: > before release 8.6, the order of arguments didn't matter No, order mattered even back then. For example: $ du --version | sed 1q du (GNU coreutils) 8.4 $ ls -li d/* e/* 11765482 -rw-r--r-- 1 eggert csfac 159910666 May 1 20:42 d/j 23558745 -rw-r--r-- 2 eggert csfac 410000000 Apr 22 21:34 d/k 23558745 -rw-r--r-- 2 eggert csfac 410000000 Apr 22 21:34 e/k $ du d e d e 557664 d 4 e 156480 d 4 e $ du e d e d 401188 e 156480 d 4 e 156480 d So file argument order affected link counts even back then; it's just that before 8.6 this was true only for files with link count greater than 1, which led to odd behaviors such as the behavior shown above. What changed in 8.6 is that the behavior was made consistent for all files, not just those with link count greater than 1. so that for the same data the current version of du generates output like this: $ du --version | sed 1q du (GNU coreutils) 8.22 $ du d e d e 557664 d 4 e $ du e d e d 401188 e 156480 d This sums to the same values independent of file order, which is a plus. As far as I can see, POSIX doesn't allow the old behavior, but does allow the new one. > This leads to startlingly odd behaviors Any choice of behavior for 'du' will lead to odd behaviors sometimes, and there's no way we can make everybody happy in all cases. There is an important technical advantage of du's current behavior, though; you can get the behavior you prefer by running "du X; du Y". If we chaned du to reset itself between command-line arguments, there'd be no way to get the behavior I prefer, which is to count files just once. From debbugs-submit-bounces@debbugs.gnu.org Wed May 21 22:44:02 2014 Received: (at control) by debbugs.gnu.org; 22 May 2014 02:44:02 +0000 Received: from localhost ([127.0.0.1]:55743 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WnIzB-0006Sh-L0 for submit@debbugs.gnu.org; Wed, 21 May 2014 22:44:01 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:42605) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WnIz9-0006SQ-Kx for control@debbugs.gnu.org; Wed, 21 May 2014 22:44:00 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 32866A6002E for ; Wed, 21 May 2014 19:43:54 -0700 (PDT) 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 GJ1iEDMzeFcW for ; Wed, 21 May 2014 19:43:45 -0700 (PDT) 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 ABF6CA6001E for ; Wed, 21 May 2014 19:43:45 -0700 (PDT) Message-ID: <537D6461.8000005@cs.ucla.edu> Date: Wed, 21 May 2014 19:43:45 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: control@debbugs.gnu.org Subject: 17546 is not a bug Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: control 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: -3.0 (---) tags 17546 + notabug From debbugs-submit-bounces@debbugs.gnu.org Thu May 22 12:21:42 2014 Received: (at 17546) by debbugs.gnu.org; 22 May 2014 16:21:42 +0000 Received: from localhost ([127.0.0.1]:56738 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WnVkQ-0002Fd-3Z for submit@debbugs.gnu.org; Thu, 22 May 2014 12:21:41 -0400 Received: from qmta04.westchester.pa.mail.comcast.net ([76.96.62.40]:58230) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WnVkK-0002FH-UG for 17546@debbugs.gnu.org; Thu, 22 May 2014 12:21:36 -0400 Received: from omta04.westchester.pa.mail.comcast.net ([76.96.62.35]) by qmta04.westchester.pa.mail.comcast.net with comcast id 53QP1o0050ldTLk544MTa5; Thu, 22 May 2014 16:21:27 +0000 Received: from hobgoblin.ariadne.com ([24.34.72.61]) by omta04.westchester.pa.mail.comcast.net with comcast id 54MS1o00p1KKtkw014MTNi; Thu, 22 May 2014 16:21:27 +0000 Received: from hobgoblin.ariadne.com (hobgoblin.ariadne.com [127.0.0.1]) by hobgoblin.ariadne.com (8.14.7/8.14.7) with ESMTP id s4MGLQWN020372; Thu, 22 May 2014 12:21:26 -0400 Received: (from worley@localhost) by hobgoblin.ariadne.com (8.14.7/8.14.7/Submit) id s4MGLQtt020371; Thu, 22 May 2014 12:21:26 -0400 Date: Thu, 22 May 2014 12:21:26 -0400 Message-Id: <201405221621.s4MGLQtt020371@hobgoblin.ariadne.com> From: worley@alum.mit.edu (Dale R. Worley) To: Paul Eggert In-reply-to: <537D6403.5050300@cs.ucla.edu> (eggert@cs.ucla.edu) Subject: Re: bug#17546: Problem with du References: <201405220016.s4M0GX0b025247@hobgoblin.ariadne.com> <537D6403.5050300@cs.ucla.edu> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1400775687; bh=Ao0IsKh6q3A4x02QFe0ynxnq8KNUb5cRlT29gOt0c9Y=; h=Received:Received:Received:Received:Date:Message-Id:From:To: Subject; b=jYp97titWZVTNquzvl+qqVNuxjX+TsFjlwGw5FGPPcZkyqV8kVXyao1FVt8ZRjx/E PHJIP4poe1gtuXShBMjZeUKSA2s++pFCTH2bFsL6fEAXdGoaZyWDOpS+F4zTLH1Tw6 Omuxikt4Cw3yQoxXKx2LCo1xPe0leueH/Bk+B4zBxmEWZEfbQjnkfZNIddHZYWVFou 8Kb+8r56/jfN9XBumRJikeg+95nVnLRRHGxJEW6bMKxm4TfEBTxpX2xvrO9AMPOLNp NJHAps9pxIo3tE/0WfZdDfUV5WPizWas9KZKA0F8oDzWDNrDPPaplrt9frEci4IkQA eBxgfxnGf98FQ== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 17546 Cc: 17546@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 (/) > From: Paul Eggert > As far as I can see, POSIX doesn't allow the old behavior, but does > allow the new one. I looked at what I think is the Posix spec for du (http://pubs.opengroup.org/onlinepubs/9699919799/utilities/du.html#tag_20_36), and I don't see anything that covers the situation one way or another, but there may be additional relevant information that I'm not aware of. > > This leads to startlingly odd behaviors > > Any choice of behavior for 'du' will lead to odd behaviors sometimes, > and there's no way we can make everybody happy in all cases. There is > an important technical advantage of du's current behavior, though; you > can get the behavior you prefer by running "du X; du Y". If we chaned > du to reset itself between command-line arguments, there'd be no way to > get the behavior I prefer, which is to count files just once. OTOH, what I want "du *" to generate has to be done with "for F in * ; do du $F ; done", which is pretty annoying. I'd like to suggest adding another option to du to establish the behavior I want. It would be a weaker-grade of -l. (I shouldn't have any trouble writing the code for that.) Also, I think a few additional sentences in the manual page would make du's behavior clearer. Dale From debbugs-submit-bounces@debbugs.gnu.org Thu May 22 12:57:02 2014 Received: (at 17546) by debbugs.gnu.org; 22 May 2014 16:57:02 +0000 Received: from localhost ([127.0.0.1]:56781 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WnWIf-0003X4-G0 for submit@debbugs.gnu.org; Thu, 22 May 2014 12:57:02 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:48339) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WnWId-0003Wd-9q for 17546@debbugs.gnu.org; Thu, 22 May 2014 12:57:00 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 7D9FAA60035; Thu, 22 May 2014 09:56:52 -0700 (PDT) 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 40diYKaY+p2z; Thu, 22 May 2014 09:56:47 -0700 (PDT) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id D23C9A6001E; Thu, 22 May 2014 09:56:47 -0700 (PDT) Message-ID: <537E2C4B.7080500@cs.ucla.edu> Date: Thu, 22 May 2014 09:56:43 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: "Dale R. Worley" Subject: Re: bug#17546: Problem with du References: <201405220016.s4M0GX0b025247@hobgoblin.ariadne.com> <537D6403.5050300@cs.ucla.edu> <201405221621.s4MGLQtt020371@hobgoblin.ariadne.com> In-Reply-To: <201405221621.s4MGLQtt020371@hobgoblin.ariadne.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 17546 Cc: 17546@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: -3.0 (---) On 05/22/2014 09:21 AM, Dale R. Worley wrote: > I don't see anything that covers the situation one way or another I suppose you're right; the specification is terse, and I guess it can be read in a different way. > I'd like to suggest adding another option to du to establish the > behavior I want. What behavior do you want? I hope it's not the pre-8.6 behavior, which had the properties documented in , where files with link counts > 1 were counted only once while files with link counts == 1 were counted multiple times. Is there a version of du somewhere that behaves the way you want? (Solaris, FreeBSD, etc.?) That might give us insight as to what would be a good option here. From debbugs-submit-bounces@debbugs.gnu.org Thu May 22 13:06:19 2014 Received: (at 17546) by debbugs.gnu.org; 22 May 2014 17:06:19 +0000 Received: from localhost ([127.0.0.1]:56796 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WnWRe-0003qn-Oh for submit@debbugs.gnu.org; Thu, 22 May 2014 13:06:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35521) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WnWRb-0003qY-Pi for 17546@debbugs.gnu.org; Thu, 22 May 2014 13:06:17 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4MH6C3s032312 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 22 May 2014 13:06:12 -0400 Received: from [10.3.113.154] (ovpn-113-154.phx2.redhat.com [10.3.113.154]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s4MH6Be5021399; Thu, 22 May 2014 13:06:11 -0400 Message-ID: <537E2E82.7030003@redhat.com> Date: Thu, 22 May 2014 11:06:10 -0600 From: Eric Blake Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: "Dale R. Worley" , Paul Eggert Subject: Re: bug#17546: Problem with du References: <201405220016.s4M0GX0b025247@hobgoblin.ariadne.com> <537D6403.5050300@cs.ucla.edu> <201405221621.s4MGLQtt020371@hobgoblin.ariadne.com> In-Reply-To: <201405221621.s4MGLQtt020371@hobgoblin.ariadne.com> 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="Qeb6UlfcStxHhWJtGulNCTbG90ciqlJaa" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-Spam-Score: -5.7 (-----) X-Debbugs-Envelope-To: 17546 Cc: 17546@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.7 (-----) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Qeb6UlfcStxHhWJtGulNCTbG90ciqlJaa Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 05/22/2014 10:21 AM, Dale R. Worley wrote: >> From: Paul Eggert >=20 >> As far as I can see, POSIX doesn't allow the old behavior, but does=20 >> allow the new one. >=20 > I looked at what I think is the Posix spec for du > (http://pubs.opengroup.org/onlinepubs/9699919799/utilities/du.html#tag_= 20_36), > and I don't see anything that covers the situation one way or another, > but there may be additional relevant information that I'm not aware > of. Yes, here's the additional relevant information: http://austingroupbugs.net/view.php?id=3D527 Change line 84170 [du DESCRIPTION] from: Files with multiple links shall be counted and written for only one entry. to: A file that occurs multiple times under one file operand and that has a link count greater than 1 shall be counted and written for only one entry. It is implementation-defined whether a file that has a link count no greater than 1 is counted and written just once, or is counted and written for each occurrence. It is implementation-defined whether a file that occurs under one file operand is counted for other file operands. In FUTURE DIRECTIONS, change line 84274 from "None" to "A future version of this standard may require that a file that occurs multiple times shall be counted and written for only one entry, even if the occurrences are under different file operands." Change line 84177 [du OPTIONS] from: Regardless of the presence of the -a option, non-directories given as file operands shall always be listed. to: The -a option does not affect whether non-directories given as file operands are listed. >=20 >>> This leads to startlingly odd behaviors >> >> Any choice of behavior for 'du' will lead to odd behaviors sometimes, = >> and there's no way we can make everybody happy in all cases. There is= =20 >> an important technical advantage of du's current behavior, though; you= =20 >> can get the behavior you prefer by running "du X; du Y". If we chaned= =20 >> du to reset itself between command-line arguments, there'd be no way t= o=20 >> get the behavior I prefer, which is to count files just once. >=20 > OTOH, what I want "du *" to generate has to be done with "for F in * ; > do du $F ; done", which is pretty annoying. >=20 > I'd like to suggest adding another option to du to establish the > behavior I want. It would be a weaker-grade of -l. (I shouldn't have > any trouble writing the code for that.) Also, I think a few > additional sentences in the manual page would make du's behavior > clearer. >=20 > Dale >=20 >=20 >=20 >=20 >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --Qeb6UlfcStxHhWJtGulNCTbG90ciqlJaa 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/ iQEcBAEBCAAGBQJTfi6CAAoJEKeha0olJ0NqWAQIAInJSZxHf75Y+K/HwC2OqQBL ms/h7vkxmBHehJDkPc9cuj6llHXzqbgEjuBg+w+S1oei+vmsFW3EaJnKpxJ8bYXh kgbff85lgMcHg3v7DWUDtnc1E5EUBHiwcv0Ejmhsf5Rzp2IeZFlxAFIFOQRJ8L/l UNatcdkj+i4AeZ7nIyci2B1Too7Rs7LuxBqA9NYvJ68fivMW3VGy1y+LWXgwGOk4 CrauUdmxgKM6GkLoc4ZMZzNQdXYRMoVl/KOv2kNUGg2nr2Bs7WEiO1VelflUXCaA DjaTXKwa3u49iOpw1ohLwiH9n7ZqTaSnFCPtP/VTL/6deVf2fb+ICmr29NbMdAc= =EI0K -----END PGP SIGNATURE----- --Qeb6UlfcStxHhWJtGulNCTbG90ciqlJaa-- From debbugs-submit-bounces@debbugs.gnu.org Fri May 23 16:09:22 2014 Received: (at 17546) by debbugs.gnu.org; 23 May 2014 20:09:22 +0000 Received: from localhost ([127.0.0.1]:58228 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WnvmM-00031U-AN for submit@debbugs.gnu.org; Fri, 23 May 2014 16:09:22 -0400 Received: from qmta10.westchester.pa.mail.comcast.net ([76.96.62.17]:44960) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WnvmJ-00031A-KP for 17546@debbugs.gnu.org; Fri, 23 May 2014 16:09:20 -0400 Received: from omta16.westchester.pa.mail.comcast.net ([76.96.62.88]) by qmta10.westchester.pa.mail.comcast.net with comcast id 5VJV1o0041uE5Es5AY9EJB; Fri, 23 May 2014 20:09:14 +0000 Received: from hobgoblin.ariadne.com ([24.34.72.61]) by omta16.westchester.pa.mail.comcast.net with comcast id 5Y9D1o0111KKtkw3cY9DJ6; Fri, 23 May 2014 20:09:14 +0000 Received: from hobgoblin.ariadne.com (hobgoblin.ariadne.com [127.0.0.1]) by hobgoblin.ariadne.com (8.14.7/8.14.7) with ESMTP id s4NK9Dki013357; Fri, 23 May 2014 16:09:13 -0400 Received: (from worley@localhost) by hobgoblin.ariadne.com (8.14.7/8.14.7/Submit) id s4NK9DWT013356; Fri, 23 May 2014 16:09:13 -0400 Date: Fri, 23 May 2014 16:09:13 -0400 Message-Id: <201405232009.s4NK9DWT013356@hobgoblin.ariadne.com> From: worley@alum.mit.edu (Dale R. Worley) To: Paul Eggert In-reply-to: <537E2C4B.7080500@cs.ucla.edu> (eggert@cs.ucla.edu) Subject: Re: bug#17546: Problem with du References: <201405220016.s4M0GX0b025247@hobgoblin.ariadne.com> <537D6403.5050300@cs.ucla.edu> <201405221621.s4MGLQtt020371@hobgoblin.ariadne.com> <537E2C4B.7080500@cs.ucla.edu> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1400875754; bh=6qeE0/kcHMOGayCeGW0Lt1W/o2eSBcsmfmna33awct4=; h=Received:Received:Received:Received:Date:Message-Id:From:To: Subject; b=bpPWpwIoqOaxH/6o9naxDExaqRT1tCE2HdzabKZIpq3gyTLSll8T+eNdvAB1ycOrd J1PGodJXtEM+Q6G9KFyOU66FYE9kQx+r9RiPB3VA/KjMB5VaZ9rrC1YEL2eCUGaFGr IgHmp2mFoEZuyM0tyvG5HfuyGchx6putD1o1bjY46HVaYTAKdhDzVP4baxYiczKYzD HSQ66jn5KAumWTipUpmhDD6xdInZhWLrzStaeVHLFo1EQpApHEchv8ZE7QU924Bcs+ slTBEw4UEPVQfszfqeReRMvGwjC8GQD+LXSXZaP359nX8EybdESM92BOF6pakFn2F7 iyN5uFUZNaALg== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 17546 Cc: 17546@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 (/) > From: Paul Eggert > What behavior do you want? I'll write out an unambiguous description of what I'm looking for, along with a set of edits to the manual page that should make it clear. Dale From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 11 18:15:48 2018 Received: (at control) by debbugs.gnu.org; 11 Oct 2018 22:15:48 +0000 Received: from localhost ([127.0.0.1]:45654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gAjFE-0002PD-5i for submit@debbugs.gnu.org; Thu, 11 Oct 2018 18:15:48 -0400 Received: from mail-pf1-f181.google.com ([209.85.210.181]:39391) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gAjFC-0002Ow-D5 for control@debbugs.gnu.org; Thu, 11 Oct 2018 18:15:46 -0400 Received: by mail-pf1-f181.google.com with SMTP id c25-v6so5102440pfe.6 for ; Thu, 11 Oct 2018 15:15:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:message-id:date:user-agent:mime-version:content-language :content-transfer-encoding; bh=aCMPf+7kyoxN+rBTekFZz3oWrRjDvMuc6vTuYT21Ayk=; b=jQSTj1oIOh/kU+0QgvVa9jAf+WwO4i158LaHlPg5KcDpTdIIMVsexf46xGQWHnYLM8 +zReHcVThWS5DKY2PtiaYQGoq0/qHoDTNNNQ7BTSHUqQwf5HTyh5a6RobQNQugQFtydJ Rt2cbxuXfVQHEozp/uVR62CVqhNPR6aaaYGnlGU20ZoIjt4uN5rnGh2BcOMDV5upRjvo 6dwGWMSXjJC8ddSe+KJfFeLw6KnDTzBrUeAiZj247qIw5PooKZAmz9jkgQfx2LmRWPJC 98xDJquUSuqjjWj758gJwUlPLaWqlEn+H43oIvxpqV7epCT+uuams8HD7MkjZy1uo3/8 nwXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=aCMPf+7kyoxN+rBTekFZz3oWrRjDvMuc6vTuYT21Ayk=; b=XAcJmAEOey9bb2WzHT6+srgmRjRzR4cDJbuTkbhLNQxG/XSET2F5+c/jjtle2ISd0V YsQW4UwM1Z1NbdhHaf5HYWoZ0bZ6A7oO7bzRAWXn4000cNozruOCjhAqqpwg2RAkePfP CboI+2L8zn9621bO6EApDM3/7ZZVOJt7Ca3HO7PZ4EXgZXAorXCKS93G/O64ggjklOud 3XKuBNBnYabnsHdE00C3fOPEUO9WVB+MFDzrf7X37xHyNiFxeTz24yLJJxTZ5gEYlMWQ s0j/PGkwzaDWVWEWjs5iKC2GQvuq9P92h+5Y5lCllSnlj8/pChugcBAQtQhPz3RZnIbG h/8A== X-Gm-Message-State: ABuFfogJB04BZVDOwb0VfdxCQKygSQpusXbFwqFvlObU9/zrOBl+BIHK lIYX2UAUTb546doifRv5Qh/++IfM X-Google-Smtp-Source: ACcGV63/p1ZxnixeZlKyAhWdRojntCOIqhMBML/uGDJBsBc9xOlhDy1myTnczOQ7SPvTJ1b7zRMyWA== X-Received: by 2002:a62:3384:: with SMTP id z126-v6mr3277051pfz.85.1539296139769; Thu, 11 Oct 2018 15:15:39 -0700 (PDT) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id t15-v6sm66768319pfj.7.2018.10.11.15.15.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Oct 2018 15:15:38 -0700 (PDT) To: control@debbugs.gnu.org From: Assaf Gordon Message-ID: Date: Thu, 11 Oct 2018 16:15:36 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tags 15308 notabug close 15308 tags 15634 notabug close 15634 tags 16004 notabug severity 16004 wishlist close 16004 [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (assafgordon[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.210.181 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.210.181 listed in wl.mailspike.net] 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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: 1.0 (+) tags 15308 notabug close 15308 tags 15634 notabug close 15634 tags 16004 notabug severity 16004 wishlist close 16004 tags 16245 notabug close 16245 tags 16249 notabug close 16249 tags 16249 notabug close 16249 close 16309 tags 16468 notabug close 16468 tag 16530 notabug close 16530 tags 16718 notabug close 16718 tags 16742 +moreinfo close 16742 tags 16831 wontfix close 16831 tags 16838 wontfix close 16838 tags 16872 fixed close 16872 close 16945 close 17224 tags 17503 + notabug close 17503 close 17546 tags 17904 notabug close 17904 From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 24 17:20:59 2018 Received: (at control) by debbugs.gnu.org; 24 Oct 2018 21:20:59 +0000 Received: from localhost ([127.0.0.1]:40741 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFQaJ-0006Zx-4U for submit@debbugs.gnu.org; Wed, 24 Oct 2018 17:20:59 -0400 Received: from mail-pf1-f182.google.com ([209.85.210.182]:44934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFQaI-0006Zl-0F for control@debbugs.gnu.org; Wed, 24 Oct 2018 17:20:58 -0400 Received: by mail-pf1-f182.google.com with SMTP id r9-v6so3046448pff.11 for ; Wed, 24 Oct 2018 14:20:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:message-id:date:user-agent:mime-version:content-language :content-transfer-encoding; bh=pAE4ET7B+ukLryIHrmgVpJgYkZ0RsjRIb4bVC9G5YvU=; b=HH8pUkvOOi7mGznVxknIx3Dn9QKpgEIzfhXmU22lRx+3eGDo2SjzM0hRDteEDjuhDc 1qYCSQqFz7S8wTJAdWCBRtYlSNR3r54ld4ZlNEsnjpPhMDsmI05ZemI7SKB+4XAA1bCQ KqFm0U1ClPeeP8wA/g4ytEfaFUmVWpf1VTe/pK5IlNRZpUTIB3VanWEpZ0o4ecXypjji C6WZ//No4r+mBktr1rRn683JaN1JB1el2mLyivtDNZKk6Kdnx0o5boCjvOyW4sfzILwK L4m+3SagUEN6OHKSIX3yvok3hE5d1AHsWmey0TCcE7tA7B8TmPpl6Hciww4RGHLMDZBo 9Y5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=pAE4ET7B+ukLryIHrmgVpJgYkZ0RsjRIb4bVC9G5YvU=; b=NSQQJNU5QQWEP96WiAaLudmEHvXSvZyM6A/csQnpqgosSDxPocR3KkGZhk0sMlo8UJ WAi+3IX4tGCE/kxQqS47fiB1DGLiMqYmItSry7q/rQimvQeVWo4rpvcKH5AxxXT4gLNc bzQeQ2/CQLDHMdrVTQs5YH2Rq1EkHLrRHUT1bBhReNW4/GRYv6SoCEuHDyT5/wR4GYUk TG3RP0wq4WEra4I8b6zZsPrlEh0Pdvqzrw5tcOY11gNF2Vm7RI8+Td0lXYlDful1Ep6/ jmBcistjeICrG4RIvjwC49wwlR68iF4OKhWN3C7fFLweipVjHQpJLNJ4MM5NInKpvpLj dwjg== X-Gm-Message-State: AGRZ1gJuM6+jFzdz9cIGlRb1jiHfgjqrnrS+BLCce1LGb08Igm6xEI7J 2ivIZcTqEIgDATzx/H4LlsF7niZ0iTQ= X-Google-Smtp-Source: AJdET5fgIyKHXBUsVONmYs6DhUgOVIXRLRi9++wsOsPd0FwPsl2LttPnOFhr43j2Qwprp5NbRAiIUw== X-Received: by 2002:a65:6249:: with SMTP id q9-v6mr3992356pgv.392.1540416051755; Wed, 24 Oct 2018 14:20:51 -0700 (PDT) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id z15-v6sm6518750pfn.170.2018.10.24.14.20.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Oct 2018 14:20:50 -0700 (PDT) To: control@debbugs.gnu.org From: Assaf Gordon Message-ID: <34349def-8a09-0ba8-d673-e4bbf2ddb286@gmail.com> Date: Wed, 24 Oct 2018 15:20:49 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: unarchive 17546 forcemerge 17546 21926 [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.210.182 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (assafgordon[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.210.182 listed in wl.mailspike.net] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject 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: 1.0 (+) unarchive 17546 forcemerge 17546 21926 From unknown Sun Jun 22 17:10:49 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 22 Nov 2018 12:24:05 +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