From unknown Wed Sep 10 12:53:41 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#10281 <10281@debbugs.gnu.org> To: bug#10281 <10281@debbugs.gnu.org> Subject: Status: du: hard-links counting with multiple arguments (commit Reply-To: bug#10281 <10281@debbugs.gnu.org> Date: Wed, 10 Sep 2025 19:53:41 +0000 retitle 10281 du: hard-links counting with multiple arguments (commit reassign 10281 coreutils submitter 10281 Paul Eggert severity 10281 wishlist tag 10281 wontfix thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 12 13:01:56 2011 Received: (at submit) by debbugs.gnu.org; 12 Dec 2011 18:01:56 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RaACK-0007zc-Ji for submit@debbugs.gnu.org; Mon, 12 Dec 2011 13:01:56 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RaACI-0007zU-78 for submit@debbugs.gnu.org; Mon, 12 Dec 2011 13:01:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RaAB1-0000c1-1W for submit@debbugs.gnu.org; Mon, 12 Dec 2011 13:00:40 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:40643) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaAB1-0000bx-02 for submit@debbugs.gnu.org; Mon, 12 Dec 2011 13:00:35 -0500 Received: from eggs.gnu.org ([140.186.70.92]:42063) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaAAx-0003kv-2J for bug-coreutils@gnu.org; Mon, 12 Dec 2011 13:00:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RaAAs-0000bW-UR for bug-coreutils@gnu.org; Mon, 12 Dec 2011 13:00:31 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]:59972) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaAAs-0000bQ-P3 for bug-coreutils@gnu.org; Mon, 12 Dec 2011 13:00:26 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 9CF06A60001; Mon, 12 Dec 2011 10:00:25 -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 z7J9SNez0zyt; Mon, 12 Dec 2011 10:00:25 -0800 (PST) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id EBE1B39E8008; Mon, 12 Dec 2011 10:00:24 -0800 (PST) Message-ID: <4EE64133.6070309@cs.ucla.edu> Date: Mon, 12 Dec 2011 10:00:19 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 MIME-Version: 1.0 To: Kamil Dudka Subject: Re: change in behavior of du with multiple arguments (commit efe53cc) References: <201112121350.30539.kdudka@redhat.com> In-Reply-To: <201112121350.30539.kdudka@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.7 (----) X-Debbugs-Envelope-To: submit Cc: bug-coreutils@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.7 (----) On 12/12/11 04:50, Kamil Dudka wrote: > Was such a change in behavior intended? I am asking as I was not able to > find it documented anywhere. It was intended, as it provides useful functionality that can't be done if hard links aren't tracked across arguments, whereas the reverse isn't true. It's documented in , which says: If two or more hard links point to the same file, only one of the hard links is counted. The file argument order affects which links are counted, and changing the argument order may change the numbers that du outputs. Perhaps this isn't sufficiently clear, and if so, suggestions for improvements are welcome. From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 12 13:11:14 2011 Received: (at 10281) by debbugs.gnu.org; 12 Dec 2011 18:11:14 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RaALI-0008Ck-JP for submit@debbugs.gnu.org; Mon, 12 Dec 2011 13:11:13 -0500 Received: from mx.meyering.net ([88.168.87.75]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RaALG-0008Cd-A9 for 10281@debbugs.gnu.org; Mon, 12 Dec 2011 13:11:11 -0500 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id 3065860151; Mon, 12 Dec 2011 19:09:56 +0100 (CET) From: Jim Meyering To: Paul Eggert Subject: Re: bug#10281: change in behavior of du with multiple arguments (commit efe53cc) In-Reply-To: <4EE64133.6070309@cs.ucla.edu> (Paul Eggert's message of "Mon, 12 Dec 2011 10:00:19 -0800") References: <201112121350.30539.kdudka@redhat.com> <4EE64133.6070309@cs.ucla.edu> Date: Mon, 12 Dec 2011 19:09:56 +0100 Message-ID: <87fwgpveyz.fsf@rho.meyering.net> Lines: 30 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 10281 Cc: Wade Stebbings , Kamil Dudka , 10281@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) Paul Eggert wrote: > On 12/12/11 04:50, Kamil Dudka wrote: >> Was such a change in behavior intended? I am asking as I was not able to >> find it documented anywhere. > > It was intended, as it provides useful functionality that > can't be done if hard links aren't tracked across arguments, > whereas the reverse isn't true. It's documented in > , > which says: > > If two or more hard links point to the same file, > only one of the hard links is counted. The file > argument order affects which links are counted, > and changing the argument order may change the > numbers that du outputs. > > Perhaps this isn't sufficiently clear, and if so, > suggestions for improvements are welcome. FYI, Kamil's original mail never to have reached the mailing list[*], in spite of reaching debbugs and acquiring a bug number and then going on to reach Paul (the Cc'd recipient). Kamil or Paul, would you please post the original, for the record? Jim [*] Ward Vandewege confirmed that the message reached debbugs but somehow was not passed on to eggs.gnu.org. From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 12 13:31:45 2011 Received: (at 10281) by debbugs.gnu.org; 12 Dec 2011 18:31:45 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RaAfA-0000Eb-4G for submit@debbugs.gnu.org; Mon, 12 Dec 2011 13:31:45 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RaAf8-0000EU-4r for 10281@debbugs.gnu.org; Mon, 12 Dec 2011 13:31:43 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id CF704A60002; Mon, 12 Dec 2011 10:30:27 -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 lArAIvSG5pUP; Mon, 12 Dec 2011 10:30:27 -0800 (PST) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 136A639E800A; Mon, 12 Dec 2011 10:30:27 -0800 (PST) Message-ID: <4EE64842.6030706@cs.ucla.edu> Date: Mon, 12 Dec 2011 10:30:26 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 MIME-Version: 1.0 To: Jim Meyering Subject: Re: bug#10281: change in behavior of du with multiple arguments (commit efe53cc) References: <201112121350.30539.kdudka@redhat.com> <4EE64133.6070309@cs.ucla.edu> <87fwgpveyz.fsf@rho.meyering.net> In-Reply-To: <87fwgpveyz.fsf@rho.meyering.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 10281 Cc: Kamil Dudka , 10281@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.0 (---) On 12/12/11 10:09, Jim Meyering wrote: > Kamil or Paul, would you please post the original, for the record? Sure, here's a copy: From: Kamil Dudka To: bug-coreutils@gnu.org Subject: change in behavior of du with multiple arguments (commit efe53cc) Date: Mon, 12 Dec 2011 13:50:30 +0100 Cc: Paul Eggert Message-Id: <201112121350.30539.kdudka@redhat.com> Hi, the following upstream commit introduces a major change in behavior of du when multiple arguments are specified: http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=efe53cc ... and the issue has landed as a bug in our Bugzilla: https://bugzilla.redhat.com/747075#c3 Was such a change in behavior intended? I am asking as I was not able to find it documented anywhere. The up2date man page states: Summarize disk usage of each FILE, recursively for directories. ..., where FILE refers to a single argument given to du. The info documentation states: The FILE argument order affects which links are counted, and changing the argument order may change the numbers that `du' outputs. However, changing the numbers is one thing and missing lines in the output of du is quite another thing. Could anybody please clarify the current behavior of du? Thanks in advance! Kamil From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 12 15:31:49 2011 Received: (at 10281) by debbugs.gnu.org; 12 Dec 2011 20:31:49 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RaCXM-00031j-Jh for submit@debbugs.gnu.org; Mon, 12 Dec 2011 15:31:48 -0500 Received: from joseki.proulx.com ([216.17.153.58]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RaCXJ-00031Z-Ld for 10281@debbugs.gnu.org; Mon, 12 Dec 2011 15:31:46 -0500 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id 8F37A211D1; Mon, 12 Dec 2011 13:30:30 -0700 (MST) Received: by hysteria.proulx.com (Postfix, from userid 1000) id 30C702DCD7; Mon, 12 Dec 2011 13:30:30 -0700 (MST) Date: Mon, 12 Dec 2011 13:30:30 -0700 From: Bob Proulx To: 10281@debbugs.gnu.org, Wade Stebbings , Kamil Dudka Subject: Re: bug#10281: change in behavior of du with multiple arguments (commit efe53cc) Message-ID: <20111212203030.GA19268@hysteria.proulx.com> References: <201112121350.30539.kdudka@redhat.com> <4EE64133.6070309@cs.ucla.edu> <87fwgpveyz.fsf@rho.meyering.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87fwgpveyz.fsf@rho.meyering.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: 10281 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) Jim Meyering wrote: > FYI, Kamil's original mail never to have reached the mailing list[*], It was sitting in the debbugs-submit queue waiting for a human. I reviewed the queues a few minutes ago and sent it through. At least I am pretty sure it was the same message I saw there. I hadn't realized it was something to note until after I read the thread here just now. Here is the interesting part of the trail. Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RaC73-0002OB-Uh for submit@debbugs.gnu.org; Mon, 12 Dec 2011 15:04:40 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ra5Mj-0000gC-LJ for submit@debbugs.gnu.org; Mon, 12 Dec 2011 07:52:23 -0500 > in spite of reaching debbugs and acquiring a bug number That does seem strange since I didn't think it got a bug number until after it went through debbugs. It had a bug number and so it must have already gone through debbugs. It must work differently from that somehow. > and then going on to reach Paul (the Cc'd recipient). Of course the CC would be a direct message outside of any of the bug tracking and mailing lists. Bob From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 12 15:34:32 2011 Received: (at 10281) by debbugs.gnu.org; 12 Dec 2011 20:34:32 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RaCa0-00035m-BS for submit@debbugs.gnu.org; Mon, 12 Dec 2011 15:34:32 -0500 Received: from mx.meyering.net ([88.168.87.75]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RaCZy-00035e-Br for 10281@debbugs.gnu.org; Mon, 12 Dec 2011 15:34:31 -0500 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id 97E766007E; Mon, 12 Dec 2011 21:33:15 +0100 (CET) From: Jim Meyering To: Bob Proulx Subject: Re: bug#10281: change in behavior of du with multiple arguments (commit efe53cc) In-Reply-To: <20111212203030.GA19268@hysteria.proulx.com> (Bob Proulx's message of "Mon, 12 Dec 2011 13:30:30 -0700") References: <201112121350.30539.kdudka@redhat.com> <4EE64133.6070309@cs.ucla.edu> <87fwgpveyz.fsf@rho.meyering.net> <20111212203030.GA19268@hysteria.proulx.com> Date: Mon, 12 Dec 2011 21:33:15 +0100 Message-ID: <87aa6xv8c4.fsf@rho.meyering.net> Lines: 35 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 10281 Cc: Kamil Dudka , 10281@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) Bob Proulx wrote: > Jim Meyering wrote: >> FYI, Kamil's original mail never to have reached the mailing list[*], > > It was sitting in the debbugs-submit queue waiting for a human. I > reviewed the queues a few minutes ago and sent it through. At least I > am pretty sure it was the same message I saw there. I hadn't realized > it was something to note until after I read the thread here just now. > Here is the interesting part of the trail. > > Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) > by debbugs.gnu.org with esmtp (Exim 4.69) > (envelope-from ) > id 1RaC73-0002OB-Uh > for submit@debbugs.gnu.org; Mon, 12 Dec 2011 15:04:40 -0500 > Received: from eggs.gnu.org ([140.186.70.92]) > by debbugs.gnu.org with esmtp (Exim 4.69) > (envelope-from ) id 1Ra5Mj-0000gC-LJ > for submit@debbugs.gnu.org; Mon, 12 Dec 2011 07:52:23 -0500 > >> in spite of reaching debbugs and acquiring a bug number > > That does seem strange since I didn't think it got a bug number until > after it went through debbugs. It had a bug number and so it must > have already gone through debbugs. It must work differently from that > somehow. > >> and then going on to reach Paul (the Cc'd recipient). > > Of course the CC would be a direct message outside of any of the bug > tracking and mailing lists. Thanks, Bob. I forgot about the debbugs queue. I checked only the bug-coreutils mailman admin queue. From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 12 19:26:03 2011 Received: (at control) by debbugs.gnu.org; 13 Dec 2011 00:26:03 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RaGC2-0008PC-2x for submit@debbugs.gnu.org; Mon, 12 Dec 2011 19:26:02 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RaGBz-0008On-Jt for control@debbugs.gnu.org; Mon, 12 Dec 2011 19:26:00 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id AB2D839E800A for ; Mon, 12 Dec 2011 16:24:43 -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 Ohhg6S0F-2nx for ; Mon, 12 Dec 2011 16:24:43 -0800 (PST) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 5C85C39E8008 for ; Mon, 12 Dec 2011 16:24:43 -0800 (PST) Message-ID: <4EE69B4B.9060405@cs.ucla.edu> Date: Mon, 12 Dec 2011 16:24:43 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 MIME-Version: 1.0 To: control@debbugs.gnu.org Subject: bugs 10281 and 10282 are duplicates Content-Type: text/plain; charset=UTF-8 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.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.0 (---) forcemerge 10282 10281 thanks Somehow bug#10282 was delayed, and my reply to it started bug#10281. I'm merging the two now. From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 14 04:04:15 2011 Received: (at 10281) by debbugs.gnu.org; 14 Dec 2011 09:04:15 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rakl4-0005Dh-33 for submit@debbugs.gnu.org; Wed, 14 Dec 2011 04:04:14 -0500 Received: from mail-ey0-f172.google.com ([209.85.215.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RaYvm-0004oY-GR for 10281@debbugs.gnu.org; Tue, 13 Dec 2011 15:26:31 -0500 Received: by eaad1 with SMTP id d1so81184eaa.3 for <10281@debbugs.gnu.org>; Tue, 13 Dec 2011 12:25:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=ZS3SAMXmsCYbLWOSceS+fYXBGw5znCmOl7KDDrLSIno=; b=G/oXiw3l/ta+P1lL9ibDa5zlMxaE0eP3pQpMxToscCEowSpKBWDFe3YnJ9zOOe4iiR xnqBWHP9RsYxs2pC0xEHQgBGXpvDUGFXLEOh+YbyXu43kr0yigGpsA4WZwBjp8dnLzd2 wdgeHx3RHl9z4Rht4gHl6vyxDx4H7wJFoIBH8= MIME-Version: 1.0 Received: by 10.205.133.129 with SMTP id hy1mr4961580bkc.28.1323807910077; Tue, 13 Dec 2011 12:25:10 -0800 (PST) Received: by 10.204.229.71 with HTTP; Tue, 13 Dec 2011 12:25:10 -0800 (PST) Date: Tue, 13 Dec 2011 13:25:10 -0700 Message-ID: Subject: change in behavior of du with multiple arguments (commit efe53cc) From: Elliott Forney To: 10281@debbugs.gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 10281 X-Mailman-Approved-At: Wed, 14 Dec 2011 04:04:12 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) I think everyone is missing a subtle point here. If I run "du -s a a/b" then there are in fact NOT two hard links to the same file (Linux doesn't even allow hard linked directories). Rather, there are two command line arguments pointing to two directories that are not mutually exclusive. This is a subtle but important difference and I think POSIX is being misinterpreted/misused here. Personally, I find the new behavior to be counter intuitive and I have talked to several confused users about this change. I have also seen at least one script break. Also, as Eric noted, the du implementations in Solaris, OSX and AIX (all of which are POSIX compliant) give the same output for "du -s a a/b" and "du -s a; du -s a/b" From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 14 14:04:33 2011 Received: (at 10281) by debbugs.gnu.org; 14 Dec 2011 19:04:33 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rau80-0005xf-MM for submit@debbugs.gnu.org; Wed, 14 Dec 2011 14:04:33 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rau7y-0005xW-1X for 10281@debbugs.gnu.org; Wed, 14 Dec 2011 14:04:31 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id C360139E800A; Wed, 14 Dec 2011 11:03:03 -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 8fpYzAYSZyR6; Wed, 14 Dec 2011 11:03:03 -0800 (PST) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 61BA439E8007; Wed, 14 Dec 2011 11:03:03 -0800 (PST) Message-ID: <4EE8F2E7.8000503@cs.ucla.edu> Date: Wed, 14 Dec 2011 11:03:03 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 MIME-Version: 1.0 To: Elliott Forney Subject: Re: bug#10281: change in behavior of du with multiple arguments (commit efe53cc) References: <4EE64133.6070309@cs.ucla.edu> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 10281 Cc: 10281@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.0 (---) On 12/13/11 12:25, Elliott Forney wrote: > If I run "du -s a > a/b" then there are in fact NOT two hard links to the same file (Linux > doesn't even allow hard linked directories). The intent of the POSIX spec is that files should be counted only once, regardless of whether they are arrived at via hard links, or by following symbolic links with -L, or by any other means. One does not need to appeal to hard-linked directories to run into the issue. For example: $ mkdir d $ echo foo >f $ ln f d/f $ du d f 2 d 1 f It's hard to argue that POSIX allows this behavior, even though it's what Solaris 10 du does. > the du implementations in Solaris, OSX and AIX > (all of which are POSIX compliant) No, I don't think they conform to POSIX in the above example. Perhaps this is a bug in POSIX, of course, but there is a good argument for why GNU du behaves the way it does: you get useful behavior that you cannot get easily with the Solaris du behavior. From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 14 16:55:48 2011 Received: (at 10281) by debbugs.gnu.org; 14 Dec 2011 21:55:48 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rawnj-0001Sd-SJ for submit@debbugs.gnu.org; Wed, 14 Dec 2011 16:55:47 -0500 Received: from c-68-60-252-82.hsd1.in.comcast.net ([68.60.252.82] helo=kosh.dhis.org) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1Rawni-0001SX-L5 for 10281@debbugs.gnu.org; Wed, 14 Dec 2011 16:55:47 -0500 Received: (qmail 29466 invoked by uid 1000); 14 Dec 2011 21:54:20 -0000 Message-ID: <20111214215419.29465.qmail@kosh.dhis.org> From: "Alan Curry" Subject: Re: bug#10281: change in behavior of du with multiple arguments (commit To: 10281@debbugs.gnu.org Date: Wed, 14 Dec 2011 16:54:19 -0500 (GMT+5) In-Reply-To: <4EE8F2E7.8000503@cs.ucla.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 10281 Cc: Elliott Forney X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.7 (/) Paul Eggert writes: > > Perhaps this is a bug in POSIX, of course, but there is a > good argument for why GNU du behaves the way it does: you get > useful behavior that you cannot get easily with the Solaris > du behavior. > Remind us again... the "useful behavior" is that du -s returns a column of numbers next to a column of names, and the numbers don't necessarily have any individual meaning relevant to the adjacent names, but you can add them up manually and get something that is correct total for the group. Meanwhile if you wanted the total for the group you would have used -c and not had to add them up manually. Why not let the -c total be correct *and* the -s individual numbers also be correct for the names they are next to? Like this: $ mkdir a b ; echo hello > a/a ; ln a/a b/b ; du -cs a b 8 a 8 b 12 total The fact that the numbers on the left don't add up means there is less redundancy in the output. Each number actually tells me something you can't derive from the others. There is higher information content. This is good, not bad. -- Alan Curry From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 14 17:15:03 2011 Received: (at 10281) by debbugs.gnu.org; 14 Dec 2011 22:15:03 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rax6L-0001sm-D3 for submit@debbugs.gnu.org; Wed, 14 Dec 2011 17:15:02 -0500 Received: from joseki.proulx.com ([216.17.153.58]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rax6J-0001sU-D7 for 10281@debbugs.gnu.org; Wed, 14 Dec 2011 17:15:00 -0500 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id A7F62211D1 for <10281@debbugs.gnu.org>; Wed, 14 Dec 2011 15:13:32 -0700 (MST) Received: by hysteria.proulx.com (Postfix, from userid 1000) id 6EF1B2DCD7; Wed, 14 Dec 2011 15:13:32 -0700 (MST) Date: Wed, 14 Dec 2011 15:13:32 -0700 From: Bob Proulx To: 10281@debbugs.gnu.org Subject: Re: bug#10281: change in behavior of du with multiple arguments (commit Message-ID: <20111214221332.GA13775@hysteria.proulx.com> Mail-Followup-To: 10281@debbugs.gnu.org References: <4EE64133.6070309@cs.ucla.edu> <20111214215419.29465.qmail@kosh.dhis.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111214215419.29465.qmail@kosh.dhis.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: 10281 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) Alan Curry wrote: > Why not let the -c total be correct *and* the -s individual numbers also be > correct for the names they are next to? Like this: > > $ mkdir a b ; echo hello > a/a ; ln a/a b/b ; du -cs a b > 8 a > 8 b > 12 total > > The fact that the numbers on the left don't add up means there is less > redundancy in the output. Each number actually tells me something you can't > derive from the others. There is higher information content. This is good, > not bad. I like this idea. +1 Bob From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 14 20:48:05 2011 Received: (at 10281) by debbugs.gnu.org; 15 Dec 2011 01:48:05 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rb0QW-0006iY-5u for submit@debbugs.gnu.org; Wed, 14 Dec 2011 20:48:04 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rb0QQ-0006i5-HT for 10281@debbugs.gnu.org; Wed, 14 Dec 2011 20:48:01 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 97C7739E800B; Wed, 14 Dec 2011 17:46: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 utjPHLt9nYdu; Wed, 14 Dec 2011 17:46:30 -0800 (PST) Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 1B76439E8006; Wed, 14 Dec 2011 17:46:30 -0800 (PST) Message-ID: <4EE95175.1020903@cs.ucla.edu> Date: Wed, 14 Dec 2011 17:46:29 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111124 Thunderbird/8.0 MIME-Version: 1.0 To: Alan Curry Subject: Re: bug#10281: change in behavior of du with multiple arguments (commit References: <4EE64133.6070309@cs.ucla.edu> <20111214215419.29465.qmail@kosh.dhis.org> In-Reply-To: <20111214215419.29465.qmail@kosh.dhis.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 10281 Cc: 10281@debbugs.gnu.org, Elliott Forney X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.9 (--) On 12/14/11 13:54, Alan Curry wrote: > Why not let the -c total be correct *and* the -s individual numbers also be > correct for the names they are next to? Well, for starters, because the individual numbers *are* correct for the names they are next to, for a reasonable definition of "correct". If the working directory has two subdirectories A and B in that order, it's counterintuitive that "du ." should output different numbers for B than "du A B" does. It's more intuitive if the two invocations of du output numbers that agree. But the Solaris du semantics require that the numbers must disagree if A and B share space. The use case you gave works with two arguments, but it loses useful information with three or more arguments. For example, suppose I have a bunch of hard links that all reside in three directories A, B, and C, and I want to find out how much disk space I'll reclaim by removing C. (This is a common situation with git clones, for example.) With GNU du, I can run "du -s A B C" and the output line labeled "C" will tell me how much disk space I'll reclaim. There's no easy way to do this with Solaris du. In contrast, GNU du can easily support the use case you mentioned, even with more than two arguments: du -s A du -s B du -s C du -cs A B C | tail -1 so in this sense its semantics are more powerful than those of Solaris du. From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 15 03:32:09 2011 Received: (at 10281) by debbugs.gnu.org; 15 Dec 2011 08:32:09 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rb6jZ-0007Sl-5A for submit@debbugs.gnu.org; Thu, 15 Dec 2011 03:32:09 -0500 Received: from senmx11-mx.siemens-enterprise.com ([62.134.46.9]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rb6jX-0007Se-GZ for 10281@debbugs.gnu.org; Thu, 15 Dec 2011 03:32:08 -0500 Received: from MCHP064A.global-ad.net (unknown [172.29.37.63]) by senmx11-mx.siemens-enterprise.com (Server) with ESMTP id 21CAA1EB84B5; Thu, 15 Dec 2011 09:30:38 +0100 (CET) Received: from MCHP058A.global-ad.net ([172.29.37.55]) by MCHP064A.global-ad.net ([172.29.37.63]) with mapi; Thu, 15 Dec 2011 09:30:38 +0100 From: "Voelker, Bernhard" To: Bob Proulx , "10281@debbugs.gnu.org" <10281@debbugs.gnu.org> Date: Thu, 15 Dec 2011 09:30:36 +0100 Subject: RE: bug#10281: change in behavior of du with multiple arguments (commit Thread-Topic: bug#10281: change in behavior of du with multiple arguments (commit Thread-Index: Acy6rclNJMfodBjrQWKMVzyYR6ccAgAU7VcA Message-ID: <7856072A9D04C24B82DFE2B1112FE38A0D8939BFE7@MCHP058A.global-ad.net> References: <4EE64133.6070309@cs.ucla.edu> <20111214215419.29465.qmail@kosh.dhis.org> <20111214221332.GA13775@hysteria.proulx.com> In-Reply-To: <20111214221332.GA13775@hysteria.proulx.com> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE, en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -3.2 (---) X-Debbugs-Envelope-To: 10281 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.2 (---) Bob Proulx wrote: > Alan Curry wrote: > > Why not let the -c total be correct *and* the -s individual numbers als= o be > > correct for the names they are next to? Like this: > >=20 > > $ mkdir a b ; echo hello > a/a ; ln a/a b/b ; du -cs a b > > 8 a > > 8 b > > 12 total > >=20 > > The fact that the numbers on the left don't add up means there is less > > redundancy in the output. Each number actually tells me something you c= an't > > derive from the others. There is higher information content. This is go= od, > > not bad. >=20 > I like this idea. +1 I also like the idea, but is there already consensus on the starting question: what to do with - I call it - stacked arguments? $ mkdir -p d/d $ echo foo > d/f $ echo bar > d/d/g $ ln d/f d/d/f $ du -s d d/d I omitted the result, but I think Paul's question is the important one: "how much disk space I'll reclaim by removing ..." Therefore, and from a user's perspective, I'd expect du to count d/d again for the sum of the first argument d. Is this covered by the proposal? What would be the output for the above example? Have a nice day, Berny= From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 16 18:34:35 2011 Received: (at 10281) by debbugs.gnu.org; 16 Dec 2011 23:34:35 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RbhIQ-0000Va-Iv for submit@debbugs.gnu.org; Fri, 16 Dec 2011 18:34:35 -0500 Received: from mail-ey0-f172.google.com ([209.85.215.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rbehd-0004wg-EL for 10281@debbugs.gnu.org; Fri, 16 Dec 2011 15:48:26 -0500 Received: by eaad1 with SMTP id d1so3145574eaa.3 for <10281@debbugs.gnu.org>; Fri, 16 Dec 2011 12:46:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=cnTyJEYgH/6K02BthllGjFcatKYS06+xJsqdyCDWz+Y=; b=bSHrAk2vpDTFMnoehOlp3RvYkYjl8G5FaolfVlF4IxIV6IFpn3tk5q/ghd9/EAkmMs jkrCWAEBaxmXoTY8AuZ+Y/e4qEwxQX1fq6bwk4o61VngYIAmDlHoYKSwZJMZ6omHXb9g DXQgAYIGfBhvXUf9dmTQqYnTHdY1vn1jFSBm4= MIME-Version: 1.0 Received: by 10.204.153.216 with SMTP id l24mr3403061bkw.64.1324068407533; Fri, 16 Dec 2011 12:46:47 -0800 (PST) Received: by 10.204.229.71 with HTTP; Fri, 16 Dec 2011 12:46:47 -0800 (PST) In-Reply-To: <4EE8F2E7.8000503@cs.ucla.edu> References: <4EE64133.6070309@cs.ucla.edu> <4EE8F2E7.8000503@cs.ucla.edu> Date: Fri, 16 Dec 2011 13:46:47 -0700 X-Google-Sender-Auth: I_oEWIM_WmNj_ha59_2J0DN8rxY Message-ID: Subject: Re: bug#10281: change in behavior of du with multiple arguments (commit efe53cc) From: Elliott Forney To: Paul Eggert Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 10281 X-Mailman-Approved-At: Fri, 16 Dec 2011 18:34:32 -0500 Cc: 10281@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) > The intent of the POSIX spec is that files should be counted only once, > regardless of whether they are arrived at via hard links, or by following > symbolic links with -L, or by any other means. I agree that symlinks and hard links and maybe even bind mounts or whatever else should not be counted twice. I do think, however, that multiple command line arguments should be counted individually since they were explicitly specified by the user. At least by default. My proposed solution would be the following: By default, files with the same inode should only be counted once for each command line argument. This can already be overridden with --count-links. However, everything should be reset between command line arguments so that multiple command line arguments are counted individually. As pointed out by Alan Curry, -c should be used to get a correct total. In addition to this, it would be nice if there were a command line switch that allowed for files to only be counted once across all command line arguments, i.e. a switch to enable the current behavior. In this scheme, the GNU du retains compatibility with Solaris, AIX, OSX, et cetra, but the user has the option to count multiple command line arguments only once. I do agree that this functionality can be useful in some circumstances I just think it is a confusing default. > No, I don't think they conform to POSIX in the above example. > Perhaps this is a bug in POSIX Of course, maybe the first thing to do is to get clarification on the POSIX spec. From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 16 19:38:01 2011 Received: (at 10281) by debbugs.gnu.org; 17 Dec 2011 00:38:01 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RbiHo-0003YZ-IB for submit@debbugs.gnu.org; Fri, 16 Dec 2011 19:38:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RbiHk-0003YQ-Fm for 10281@debbugs.gnu.org; Fri, 16 Dec 2011 19:37:58 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pBH0aF4D017344 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 16 Dec 2011 19:36:16 -0500 Received: from [10.3.113.11] ([10.3.113.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pBH0aF0H020239; Fri, 16 Dec 2011 19:36:15 -0500 Message-ID: <4EEBE3F9.3020901@redhat.com> Date: Fri, 16 Dec 2011 17:36:09 -0700 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 MIME-Version: 1.0 To: Elliott Forney Subject: Re: bug#10281: change in behavior of du with multiple arguments (commit efe53cc) References: <4EE64133.6070309@cs.ucla.edu> <4EE8F2E7.8000503@cs.ucla.edu> In-Reply-To: X-Enigmail-Version: 1.3.4 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig0C678379D9EAB5FC2D962672" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Spam-Score: -10.3 (----------) X-Debbugs-Envelope-To: 10281 Cc: Paul Eggert , 10281@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -10.3 (----------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig0C678379D9EAB5FC2D962672 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 12/16/2011 01:46 PM, Elliott Forney wrote: > In this scheme, the GNU du retains compatibility with Solaris, AIX, > OSX, et cetra, but the user has the option to count multiple command > line arguments only once. I do agree that this functionality can be > useful in some circumstances I just think it is a confusing default. >=20 >> No, I don't think they conform to POSIX in the above example. >> Perhaps this is a bug in POSIX >=20 > Of course, maybe the first thing to do is to get clarification on the > POSIX spec. OK, I'll take on that task, and post a link once I've submitted the bug report. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig0C678379D9EAB5FC2D962672 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.4.11 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJO6+P+AAoJEKeha0olJ0NqZU8IAJQ4xuZOYJKJHcJ4tFcjks3k KLcsxUS9QdH6K5/ysQL0o4K8hjxmb0F5LMfroGCYlDIvgsrk+iNPVLA5j2Sc6KZ8 SBcyez4gwXCTuAVY0lfVe5tfvftH/15l7bMYV156YryCqKVin03VRs3+BbT+rbSl ErJ7yAxPD/Bx5KMkRaNOiNVnobut0gZxCpQF3copmUKwuqj2mXkovNdOM2xbuJCN zhqfDvWSmmoskI+SkjkpP61S8AfmrcPNYYfoPr1Q/JYBk9CwRHcAMKyae0OM/jMG DbKYsw+4bjStvMMTs3panLAYp165N7psIO1CieI85WRQh3cv19udXMylOHXTwx8= =9sC0 -----END PGP SIGNATURE----- --------------enig0C678379D9EAB5FC2D962672-- From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 16 21:38:23 2011 Received: (at 10281) by debbugs.gnu.org; 17 Dec 2011 02:38:23 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RbkAJ-0006Gc-8z for submit@debbugs.gnu.org; Fri, 16 Dec 2011 21:38:23 -0500 Received: from c-68-60-252-82.hsd1.in.comcast.net ([68.60.252.82] helo=kosh.dhis.org) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1RbkAH-0006GU-4V for 10281@debbugs.gnu.org; Fri, 16 Dec 2011 21:38:21 -0500 Received: (qmail 22625 invoked by uid 1000); 17 Dec 2011 02:36:41 -0000 Message-ID: <20111217023641.22624.qmail@kosh.dhis.org> From: "Alan Curry" Subject: Re: bug#10281: change in behavior of du with multiple arguments (commit To: 10281@debbugs.gnu.org Date: Fri, 16 Dec 2011 21:36:41 -0500 (GMT+5) In-Reply-To: <4EE95175.1020903@cs.ucla.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 10281 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.7 (/) Paul Eggert writes: > > For example, suppose I have a bunch of hard links > that all reside in three directories A, B, and C, > and I want to find out how much disk space > I'll reclaim by removing C. (This is a common situation > with git clones, for example.) With GNU du, I can run > "du -s A B C" and the output line labeled "C" will tell > me how much disk space I'll reclaim. There's no easy way > to do this with Solaris du. The straightforward method would be to simply the directory you intend to remove and keep track of the discrepancy between st_nlink and how many links you've seen. I admit that this straightforward method isn't implemented in any standard tool, but your way involves extra work by both du, which must traverse all the other directories which might share files with the target directory; and the user, who must somehow amass that list of directories ahead of time. As a creative improvised use of pre-existing tools it's a good example, but as a justification for an intentional feature, it's just too inefficient. -- Alan Curry From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 16 23:19:59 2011 Received: (at 10281) by debbugs.gnu.org; 17 Dec 2011 04:19:59 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rblkd-0008VW-Cr for submit@debbugs.gnu.org; Fri, 16 Dec 2011 23:19:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RblkY-0008VM-UP for 10281@debbugs.gnu.org; Fri, 16 Dec 2011 23:19:56 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pBH4ICHP007869 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 16 Dec 2011 23:18:12 -0500 Received: from [10.3.113.11] ([10.3.113.11]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pBH4IClE014101; Fri, 16 Dec 2011 23:18:12 -0500 Message-ID: <4EEC1803.6010106@redhat.com> Date: Fri, 16 Dec 2011 21:18:11 -0700 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 MIME-Version: 1.0 Subject: Re: bug#10281: change in behavior of du with multiple arguments (commit efe53cc) References: <4EE64133.6070309@cs.ucla.edu> <4EE8F2E7.8000503@cs.ucla.edu> <4EEBE3F9.3020901@redhat.com> In-Reply-To: <4EEBE3F9.3020901@redhat.com> X-Enigmail-Version: 1.3.4 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigDBC2053C2EFFC1E8AC9FD2F5" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-Spam-Score: -9.7 (---------) X-Debbugs-Envelope-To: 10281 Cc: Elliott Forney , Paul Eggert , 10281@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -9.7 (---------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigDBC2053C2EFFC1E8AC9FD2F5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 12/16/2011 05:36 PM, Eric Blake wrote: >>> Perhaps this is a bug in POSIX >> >> Of course, maybe the first thing to do is to get clarification on the >> POSIX spec. >=20 > OK, I'll take on that task, and post a link once I've submitted the bug= > report. Submitted, and I'll follow up later once this has been discussed in an Austin Group meeting: http://austingroupbugs.net/view.php?id=3D527 --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigDBC2053C2EFFC1E8AC9FD2F5 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.4.11 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJO7BgDAAoJEKeha0olJ0NqVTIH/iN7aJRQp+nkc/MM5/ORcK2T B8aV27EeLj1IELCeD6eJJ/2iEc7OctbzRf/w4/rgRDJ2MFBWHDhbACw8HQDybg1s 3dy1bsHujMQ2RSuwTY4Jg94QySkhJD72ND+QFakBbjXZ9H55yCcUwQIUHOvZGJQs UHGjXjveXwBSjeGM2VQt2gMcpfN8/KbrGoTERMAcoJBEauMoL1+ebBljqTNHu5h/ RvUKNRbKR9X/EtklkgXUZPTfedbkafDh5KFk9eGDv3Q1o24dp4bG0mbdDc3NwCX4 MNeHOv8o8TNzGzcqVeUJQBEoSUaMCDC7vXOJYRVZuATS/49QCBFnfhBTF3uWxBA= =Y/QT -----END PGP SIGNATURE----- --------------enigDBC2053C2EFFC1E8AC9FD2F5-- From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 17 00:11:03 2011 Received: (at 10281) by debbugs.gnu.org; 17 Dec 2011 05:11:03 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RbmY2-0001L5-3L for submit@debbugs.gnu.org; Sat, 17 Dec 2011 00:11:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RbmXx-0001Kp-Vq for 10281@debbugs.gnu.org; Sat, 17 Dec 2011 00:11:00 -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 pBH59ILg031801 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 17 Dec 2011 00:09:18 -0500 Received: from [10.3.113.3] ([10.3.113.3]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pBH59H9q010665; Sat, 17 Dec 2011 00:09:17 -0500 Message-ID: <4EEC23FD.4030705@redhat.com> Date: Fri, 16 Dec 2011 22:09:17 -0700 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 MIME-Version: 1.0 To: Don Cragun Subject: Re: [1003.1(2008)/Issue 7 0000527]: du and files found via multiple command line arguments References: <485650011699bf7dfd1933eae6eea221@austingroupbugs.net> <4DD8D2D2-A1FC-43FF-9692-E1F500E96FA5@sonic.net> In-Reply-To: <4DD8D2D2-A1FC-43FF-9692-E1F500E96FA5@sonic.net> X-Enigmail-Version: 1.3.4 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig98771E42BFB49E4EA73322CC" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Spam-Score: -10.3 (----------) X-Debbugs-Envelope-To: 10281 Cc: 10281@debbugs.gnu.org, austin-group-l X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -10.3 (----------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig98771E42BFB49E4EA73322CC Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable [cc'ing the coreutils bug id] On 12/16/2011 09:33 PM, Don Cragun wrote: > On Dec 16, 2011, at 8:15 PM, Austin Group Bug Tracker wrote: >> The following issue has been SUBMITTED.=20 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20 >> http://austingroupbugs.net/view.php?id=3D527=20 > ... ... ... >> In all likelihood, the intent of the standard was to codify traditiona= l >> behavior where the hash for duplicate files is reset each time du >> starts processing the next command line argument, and GNU du was >> wrong for trying to take the standard too literally. However, it was >> pointed out that the GNU behavior of remembering duplicates across >> multiple command line arguments does have a use not possible in the >> traditional implementation: if a user has multiple directories, all >> of which share some hard links, then only the GNU semantics make it >> possible to see how much disk space will be reclaimed by removing >> the one directory, by invoking 'du -s' with the directory to be >> removed as the last argument. Therefore, I'm presenting two options >> for solving the conflict in the standard, although my preference >> would be for option 1 (the GNU implementation is willing to change >> its behavior to comply with option 1 by adding an extension option >> to provide its current behavior of remembering links across >> multiple command line arguments, and all other implementations >> already comply with option 1). >=20 > If we go with option 1, what option would the GNU implementation > use to specify the current GNU behavior? Should option 1 be > extended to include the new option? I assume that GNU would initially prefer to go with extensions only through a long option, so as not to prematurely burn a short option on an unpopular feature and so as not to risk collisions with short option extensions chosen by other implementations. One of the thoughts in the initial bug report against GNU would be converting the existing 'du --count-links' long option into taking an optional argument, as in: du --count-links =3D> short-hand for du --count-links=3Dalways du --count-links=3Dalways =3D> no elision of multiples du --count-links=3Donce =3D> current default GNU behavior, elide links= across args du --count-links=3Dper-arg =3D> traditional behavior, elide links, but on= ly within each argument Right now, GNU has 'du -l' as a synonym for 'du --count-links', but if --count-links gains an optional qualifier, -l would NOT have an optional qualifier, but would only match --count-links=3Dalways. Obviously, POSIX= won't standardize a long option. But if POSIX deems the --count-links=3Donce behavior useful enough to standardize a new short option for it, even if GNU is the only implementation currently implementing that behavior, we have no problem assigning that short option as a synonym for the proposed --count-links=3Donce behavior. Woul= d '-o' conflict with any existing implementation, as a mnemonic for 'once across all arguments'? Or would some other short option letter be a better mnemonic? I'm not sure whether coreutils will immediately switch to having 'du' without --count-links always default to the POSIX behavior, or whether, in GNU fashion, the existence of $POSIXLY_CORRECT in the environment will affect the choice of defaulting between the compliant vs. the GNU behavior, but that's an implementation choice for GNU that should not affect the decision on the resolution of the POSIX bug. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig98771E42BFB49E4EA73322CC 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.4.11 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJO7CP9AAoJEKeha0olJ0NqRrEH/0qVXFLND0prrPyUDrHHDhLR Y5etYt8eRtbZGQA7E842Pk+Geg2wm9vkKRE4Dteh9GwkOpcQqe79fhmtd6jaIznU a6ubtzaE09B9F/FZVWUBPKoVFi7VvBAl0khzUNS4qLY2zBrExOWIJmBIvtGSLl6o iIuMg+3dhF4pIRaZ7WnQUmxwuMC1XonxgHCbCK1IfZ5OWO67Qc3CJ8xxL0uImhKg FEn7Ri8crtdMrW6bbVc+hgHfAoQzz+QsSbiv2x1pEJ2Dpib1tmpebrpF+Hp7tRbm nlT8ZcDAa060pOZ2zRLTbmu/yKCKjwICnIBDT6NtLA68EyrgY2D8LG8jqnwazLQ= =nuBd -----END PGP SIGNATURE----- --------------enig98771E42BFB49E4EA73322CC-- From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 17 02:43:17 2011 Received: (at 10281) by debbugs.gnu.org; 17 Dec 2011 07:43:17 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RbovN-0004no-82 for submit@debbugs.gnu.org; Sat, 17 Dec 2011 02:43:17 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RbovK-0004nf-9l for 10281@debbugs.gnu.org; Sat, 17 Dec 2011 02:43:15 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id A5B0239E8011; Fri, 16 Dec 2011 23:41:33 -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 rYKolAgVaJ+a; Fri, 16 Dec 2011 23:41:33 -0800 (PST) Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 31FD039E8007; Fri, 16 Dec 2011 23:41:33 -0800 (PST) Message-ID: <4EEC47A0.1060203@cs.ucla.edu> Date: Fri, 16 Dec 2011 23:41:20 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111124 Thunderbird/8.0 MIME-Version: 1.0 To: Alan Curry Subject: Re: bug#10281: change in behavior of du with multiple arguments (commit References: <4EE64133.6070309@cs.ucla.edu> <20111217023641.22624.qmail@kosh.dhis.org> In-Reply-To: <20111217023641.22624.qmail@kosh.dhis.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 10281 Cc: 10281@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.9 (--) On 12/16/11 18:36, Alan Curry wrote: > The straightforward method would be to simply the directory you intend to > remove and keep track of the discrepancy between st_nlink and how many links > you've seen. Sorry, I can't parse that. But whatever it is, it sounds like you're talking about what one could do with a program written in C, not with either GNU or Solaris du. > As a creative improvised use of pre-existing tools it's a good example, but as a > justification for an intentional feature, it's just too inefficient. I'm having trouble parsing that as well but will try to answer anyway. :-) First, the use of 'du' in the way I'm describing is not particularly creative or improvised. I use it often in link farms (i.e., directories containing many multiply-linked files). And it's no accident that Git encourages link farms either: the Git maintainer is a former coworker of mine, and even before Git existed we used link farms a lot during software development, and needed tools like 'du' to work well in link farms, and this is partly why GNU 'du' works the way it does. In short, what may have appeared to you to be an accidental use of 'du' is actually a designed one. Second, I don't see what efficiency has to do with this, because exactly the same efficiency issue arises with Solaris du, when it is given a different argument list. With Solaris du, I can get essentially the same output as GNU "du A B C" by temporarily modifying the file system, as follows: $ mkdir tmp $ mv A B C tmp $ (cd tmp; du; mv A B C ..) $ rmdir tmp Of course I'd never want to do that in an actual link farm: it's tricky and brittle and could mess up currently-running builds. But the point is that GNU du is not being inefficient here, any more than Solaris du is. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 17 03:41:53 2011 Received: (at 10281) by debbugs.gnu.org; 17 Dec 2011 08:41:53 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rbpq4-000651-Qj for submit@debbugs.gnu.org; Sat, 17 Dec 2011 03:41:53 -0500 Received: from c-68-60-252-82.hsd1.in.comcast.net ([68.60.252.82] helo=kosh.dhis.org) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1Rbppo-00064f-GL for 10281@debbugs.gnu.org; Sat, 17 Dec 2011 03:41:50 -0500 Received: (qmail 26465 invoked by uid 1000); 17 Dec 2011 08:39:55 -0000 Message-ID: <20111217083955.26464.qmail@kosh.dhis.org> From: "Alan Curry" Subject: Re: bug#10281: change in behavior of du with multiple arguments (commit To: 10281@debbugs.gnu.org Date: Sat, 17 Dec 2011 03:39:55 -0500 (GMT+5) In-Reply-To: <4EEC47A0.1060203@cs.ucla.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 10281 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.7 (/) Paul Eggert writes: > > On 12/16/11 18:36, Alan Curry wrote: > > The straightforward method would be to simply the directory you intend to > > remove and keep track of the discrepancy between st_nlink and how many links > > you've seen. > > Sorry, I can't parse that. But whatever it is, it sounds like you're > talking about what one could do with a program written in C, not with > either GNU or Solaris du. Yes, I'm saying that du is just not the tool for this job, although you've managed to twist it to fit. The "predict free space after rm -rf foo" operation can be done without searching other directories and without requiring the user to specify a list of other directories that might contain links. What you do with du is kludgy by comparison. [...] > Of course I'd never want to do that in an actual link farm: it's tricky > and brittle and could mess up currently-running builds. But the point is that > GNU du is not being inefficient here, any more than Solaris du is. > By comparison to a proper tool which doesn't do any unnecessary traversals of extra directories, your use of du is slow and brittle (if the user forgets an alternate directory containing a link, the result is wrong) and has only the slight advantage of already being implemented. Here's a working outline of the single-traversal method. I wouldn't suggest that du should contain equivalent code. A single-purpose perl script, even without pretty output formatting, feels clean enough to me. Since I've gone to the trouble (not much) of writing it, I'll keep it as ~/bin/predict_rm_rf for future use. #!/usr/bin/perl -W use strict; use File::Find; @ARGV or die "Usage: $0 directory [directory ...]\n"; my $total = 0; my %pending = (); File::Find::find({wanted => sub { my ($dev,$ino,$nlink,$blocks) = (lstat($_))[0,1,3,12]; if(-d _ || $nlink==1) { $total += $blocks; return; } if($nlink == ++$pending{"$dev.$ino"}) { delete $pending{"$dev.$ino"}; $total += $blocks; } }}, @ARGV); print "$total blocks would be freed by rm -rf @ARGV\n"; __END__ -- Alan Curry From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 17 04:21:52 2011 Received: (at 10281) by debbugs.gnu.org; 17 Dec 2011 09:21:52 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RbqSm-0006wc-GH for submit@debbugs.gnu.org; Sat, 17 Dec 2011 04:21:52 -0500 Received: from mx.meyering.net ([88.168.87.75]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RbqSk-0006wU-9t for 10281@debbugs.gnu.org; Sat, 17 Dec 2011 04:21:51 -0500 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id 979C260097; Sat, 17 Dec 2011 10:20:09 +0100 (CET) From: Jim Meyering To: "Alan Curry" Subject: Re: bug#10281: change in behavior of du with multiple arguments (commit In-Reply-To: <20111217083955.26464.qmail@kosh.dhis.org> (Alan Curry's message of "Sat, 17 Dec 2011 03:39:55 -0500 (GMT+5)") References: <4EE64133.6070309@cs.ucla.edu> <20111217083955.26464.qmail@kosh.dhis.org> Date: Sat, 17 Dec 2011 10:20:09 +0100 Message-ID: <87pqfnftbq.fsf@rho.meyering.net> Lines: 67 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 10281 Cc: 10281@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) Alan Curry wrote: ... > By comparison to a proper tool which doesn't do any unnecessary traversals of > extra directories, your use of du is slow and brittle (if the user forgets > an alternate directory containing a link, the result is wrong) and has only > the slight advantage of already being implemented. > > Here's a working outline of the single-traversal method. I wouldn't suggest > that du should contain equivalent code. A single-purpose perl script, even > without pretty output formatting, feels clean enough to me. Since I've gone > to the trouble (not much) of writing it, I'll keep it as ~/bin/predict_rm_rf > for future use. > > #!/usr/bin/perl -W > use strict; > use File::Find; > > @ARGV or die "Usage: $0 directory [directory ...]\n"; > > my $total = 0; > my %pending = (); > > File::Find::find({wanted => sub { > my ($dev,$ino,$nlink,$blocks) = (lstat($_))[0,1,3,12]; > if(-d _ || $nlink==1) { > $total += $blocks; > return; > } > if($nlink == ++$pending{"$dev.$ino"}) { > delete $pending{"$dev.$ino"}; > $total += $blocks; > } > }}, @ARGV); > > print "$total blocks would be freed by rm -rf @ARGV\n"; That seems useful. However, the number it prints is too large whenever it processes a file or directory more than $nlink times, e.g., when invoked as predict_rm_rf F F it prints double the correct number. To account for that, the script must record every dev/ino pair it processes, say via: File::Find::find({wanted => sub { my ($dev,$ino,$nlink,$blocks) = (lstat($_))[0,1,3,12]; defined $pending{"$dev.$ino"} && $pending{"$dev.$ino"} < 0 and return; if(-d _ || $nlink==1 || $nlink == ++$pending{"$dev.$ino"}) { $total += $blocks; $pending{"$dev.$ino"} = -1; return; } }}, @ARGV); Note that for a large tree, the perl code will be far less efficient than C code like du because: - the perl script must call lstat for every single entry (du can use dirent.d_ino on some file systems). When I checked about a year ago, Perl still had no good way to get something like dirent.d_ino. - du uses a compact representation for a device/inode pair, so may use a lot less memory. From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 18 17:05:48 2011 Received: (at 10281) by debbugs.gnu.org; 18 Dec 2011 22:05:48 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RcOrc-0007qB-73 for submit@debbugs.gnu.org; Sun, 18 Dec 2011 17:05:48 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RcOrY-0007q2-UP for 10281@debbugs.gnu.org; Sun, 18 Dec 2011 17:05:46 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 05521A60002; Sun, 18 Dec 2011 14:03:55 -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 fBcGQ5AUuXm2; Sun, 18 Dec 2011 14:03:54 -0800 (PST) Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 3BD15A60001; Sun, 18 Dec 2011 14:03:54 -0800 (PST) Message-ID: <4EEE6345.4050801@cs.ucla.edu> Date: Sun, 18 Dec 2011 14:03:49 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111124 Thunderbird/8.0 MIME-Version: 1.0 To: Eric Blake Subject: Re: [1003.1(2008)/Issue 7 0000527]: du and files found via multiple command line arguments References: <485650011699bf7dfd1933eae6eea221@austingroupbugs.net> <4DD8D2D2-A1FC-43FF-9692-E1F500E96FA5@sonic.net> <4EEC23FD.4030705@redhat.com> In-Reply-To: <4EEC23FD.4030705@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 10281 Cc: Don Cragun , 10281@debbugs.gnu.org, austin-group-l X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.9 (--) Eric Blake's Option 1 does not appear to be tenable, as du traditionally preserved hashes of duplicate files across all of its operands. 7th Edition Unix 'du' did that, and (as Jilles Tjoelker pointed out) so do at least two current 'du' implementations, namely, FreeBSD and GNU. The idea behind Eric's Option 2 is better, but its wording is unclear partly because of another issue Jilles raised: whether a file's disk space should be counted multiple times if the file occurs multiple times and its link count is 1. For example: mkdir d cd d cp /bin/sh w cp w y ln y ../y ln -s w x ln -s y z du -aL This analyzes a directory with two regular files, 'w' and 'y'. GNU and Solaris du count these files once each, with an accurate sum of non-symlink disk usage under the current directory. But w's link count is 1 so FreeBSD counts 'w' twice, thus overcounting disk usage. The current POSIX wording does not say what to do for this example, but the intent is to avoid overcounting disk usage, and the GNU and Solaris behavior supports this intent better. (The 7th Edition Unix behavior agrees with FreeBSD, but this predates symbolic links so the behavior is now dubious.) Given all the above, the standard's wording could be improved in several different ways, all elaborations of Option 2. Here are two possibilities: Option 2A - require that files be hashed among all operands, and that disk usage be counted at most once. 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 shall be counted and written for only one entry, even if the occurrences are under different file operands. Option 2B - leave unspecified whether files are hashed among all operands, and leave unspecified whether disk usage is counted multiple times for files whose link count does not exceed 1. From the user's point of view, this means du's output is a reliable count of disk usage only if du is invoked without -L and with -x and with at most one operand. 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. Option 2A is simpler and clearer, but it invalidates many existing implementations. Option 2B modifies the standard to describe how existing implementations actually work, but is more complicated and more of a hassle to use reliably. Eric raised one other issue: the description of the -a option implies that "du A B" must always list B. This implication is incorrect for 7th edition Unix du, GNU du, and (I expect) FreeBSD du, so it should be fixed as well. Here's one possible fix, which is independent of the abovementioned changes. Change line ????? [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. (Sorry, I don't know the line number here; I don't have a PDF copy of the current standard and don't know offhand how to get one.) From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 19 04:12:43 2011 Received: (at 10281) by debbugs.gnu.org; 19 Dec 2011 09:12:43 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RcZH0-0006Uj-ER for submit@debbugs.gnu.org; Mon, 19 Dec 2011 04:12:43 -0500 Received: from senmx11-mx.siemens-enterprise.com ([62.134.46.9]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RcZGm-0006UP-9A for 10281@debbugs.gnu.org; Mon, 19 Dec 2011 04:12:40 -0500 Received: from MCHP063A.global-ad.net (unknown [172.29.37.61]) by senmx11-mx.siemens-enterprise.com (Server) with ESMTP id 313961EB8425; Mon, 19 Dec 2011 10:10:35 +0100 (CET) Received: from MCHP058A.global-ad.net ([172.29.37.55]) by MCHP063A.global-ad.net ([172.29.37.61]) with mapi; Mon, 19 Dec 2011 10:10:35 +0100 From: "Voelker, Bernhard" To: Elliott Forney , Paul Eggert Date: Mon, 19 Dec 2011 10:10:33 +0100 Subject: RE: bug#10281: change in behavior of du with multiple arguments (commit efe53cc) Thread-Topic: bug#10281: change in behavior of du with multiple arguments (commit efe53cc) Thread-Index: Acy8TN2TWpal1OHiTYKF1v5QwLFB5AB3LdiA Message-ID: <7856072A9D04C24B82DFE2B1112FE38A0D895D35CB@MCHP058A.global-ad.net> References: <4EE64133.6070309@cs.ucla.edu> <4EE8F2E7.8000503@cs.ucla.edu> In-Reply-To: Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE, en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -3.2 (---) X-Debbugs-Envelope-To: 10281 Cc: "10281@debbugs.gnu.org" <10281@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.1 (---) Elliott Forney wrote: > > The intent of the POSIX spec is that files should be counted only once, > > regardless of whether they are arrived at via hard links, or by followi= ng > > symbolic links with -L, or by any other means. >=20 > I agree that symlinks and hard links and maybe even bind mounts or > whatever else should not be counted twice. I do think, however, that > multiple command line arguments should be counted individually since > they were explicitly specified by the user. At least by default. >=20 > My proposed solution would be the following: >=20 > By default, files with the same inode should only be counted once for > each command line argument. This can already be overridden with > --count-links. However, everything should be reset between command > line arguments so that multiple command line arguments are counted > individually. As pointed out by Alan Curry, -c should be used to get > a correct total. >=20 > In addition to this, it would be nice if there were a command line > switch that allowed for files to only be counted once across all > command line arguments, i.e. a switch to enable the current behavior. +1 The big disadvantage of counting only once for all arguments is that the result highly depends on the order of the arguments, even in a simple case without symlinks and hardlinks: $ du -s * . vs. $ du -s . * That reminds me about a real-life question you could ask your little daughter: "how many pupils are in each class and in total at school?". I guess you would send her to extra math courses if she said "Class A has 20, class B and class C have 25 each, and the school has 0." This example doesn't claim to be 100% relevant for du, but shows how "counting" and "summarizing" is burnt into human brains. Have a nice day, Berny From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 12 12:50:18 2012 Received: (at 10281) by debbugs.gnu.org; 12 Jan 2012 17:50:18 +0000 Received: from localhost ([127.0.0.1]:55327 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RlOn2-0007oI-96 for submit@debbugs.gnu.org; Thu, 12 Jan 2012 12:50:16 -0500 Received: from mx1.redhat.com ([209.132.183.28]:9771) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RlOmw-0007o6-PQ for 10281@debbugs.gnu.org; Thu, 12 Jan 2012 12:50:14 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q0CHnasC031554 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 12 Jan 2012 12:49:36 -0500 Received: from [10.3.113.48] (ovpn-113-48.phx2.redhat.com [10.3.113.48]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q0CHnZFf011184; Thu, 12 Jan 2012 12:49:35 -0500 Message-ID: <4F0F1D2E.3000606@redhat.com> Date: Thu, 12 Jan 2012 10:49:34 -0700 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: Paul Eggert Subject: Re: [1003.1(2008)/Issue 7 0000527]: du and files found via multiple command line arguments References: <485650011699bf7dfd1933eae6eea221@austingroupbugs.net> <4DD8D2D2-A1FC-43FF-9692-E1F500E96FA5@sonic.net> <4EEC23FD.4030705@redhat.com> <4EEE6345.4050801@cs.ucla.edu> In-Reply-To: <4EEE6345.4050801@cs.ucla.edu> X-Enigmail-Version: 1.3.4 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig298DA3653DB987EC768DAA8B" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 10281 Cc: Don Cragun , 10281@debbugs.gnu.org, austin-group-l X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig298DA3653DB987EC768DAA8B Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable This topic came up again on the Austin Group call today, with no good resolution yet. On 12/18/2011 03:03 PM, Paul Eggert wrote: > Eric Blake's Option 1 does not appear to be tenable, as du > traditionally preserved hashes of duplicate files across all > of its operands. 7th Edition Unix 'du' did that, and (as > Jilles Tjoelker pointed out) so do at least two current 'du' > implementations, namely, FreeBSD and GNU. >=20 > The idea behind Eric's Option 2 is better, but its wording > is unclear partly because of another issue Jilles raised: > whether a file's disk space should be counted multiple times > if the file occurs multiple times and its link count is 1. > For example: >=20 > mkdir d > cd d > cp /bin/sh w > cp w y > ln y ../y > ln -s w x > ln -s y z > du -aL >=20 > This analyzes a directory with two regular files, 'w' and > 'y'. GNU and Solaris du count these files once each, with > an accurate sum of non-symlink disk usage under the current > directory. But w's link count is 1 so FreeBSD counts 'w' > twice, thus overcounting disk usage. >=20 > The current POSIX wording does not say what to do for this > example, but the intent is to avoid overcounting disk usage, > and the GNU and Solaris behavior supports this intent better. > (The 7th Edition Unix behavior agrees with FreeBSD, but this > predates symbolic links so the behavior is now dubious.) One of the points made is that the standard currently requires elision only for files with link counts > 1. An interesting example with FreeBSD du: $ echo > a $ du -a a a 2 a 2 a $ ln a b $ du -a a a 2 a $ That is, the second argument was elided when the inode for 'a' is found in the hash, which means the hash is preserved across arguments; but the inode for 'a' is only put in the hash if the link count is > 1. >=20 > Given all the above, the standard's wording could be > improved in several different ways, all elaborations of > Option 2. Here are two possibilities: >=20 > Option 2A - require that files be hashed among all > operands, and that disk usage be counted at most once. >=20 > Change line 84170 [du DESCRIPTION] from: >=20 > Files with multiple links shall be counted and written > for only one entry. >=20 > to: >=20 > A file that occurs multiple times shall be counted and > written for only one entry, even if the occurrences > are under different file operands. >=20 > Option 2B - leave unspecified whether files are hashed > among all operands, and leave unspecified whether disk > usage is counted multiple times for files whose link > count does not exceed 1. From the user's point of view, > this means du's output is a reliable count of disk usage > only if du is invoked without -L and with -x and with at > most one operand. >=20 > Change line 84170 [du DESCRIPTION] from: >=20 > Files with multiple links shall be counted and written > for only one entry. >=20 > to: >=20 > 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. >=20 > Option 2A is simpler and clearer, but it invalidates many > existing implementations. Option 2B modifies the standard > to describe how existing implementations actually work, but > is more complicated and more of a hassle to use reliably. >=20 > Eric raised one other issue: the description of the -a > option implies that "du A B" must always list B. This > implication is incorrect for 7th edition Unix du, GNU du, > and (I expect) FreeBSD du, so it should be fixed as well. > Here's one possible fix, which is independent of the > abovementioned changes. >=20 > Change line ????? [du OPTIONS] from: >=20 > Regardless of the presence of the -a option, > non-directories given as file operands shall always > be listed. >=20 > to: >=20 > The -a option does not affect whether > non-directories given as file operands are listed. >=20 > (Sorry, I don't know the line number here; I don't have a > PDF copy of the current standard and don't know offhand how > to get one.) It boils down to a decision of whether we want to standardize a useful behavior, and whether that behavior avoids over-counting, but possibly invalidating existing implementations (in which case, it is better targetted to Issue 8), or whether we give up and declare things unspecified when encountering files with link count of 1 through multiple locations (in which case we could make the changes in TC2 of Issue 7, and still make recommendations on the underlying goal of avoiding over-counting). The call today also mentioned that cpio may have a similar issue on overcounting. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig298DA3653DB987EC768DAA8B 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.4.11 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJPDx0vAAoJEKeha0olJ0Nq0bkH/AiatV5GYDBZ+e+9lgbOJk9s CK3zfIgvEUnWOOhO4eijZF3DgelBf5CiFI/7zzGgpQmusE14Gk/wGqnUvL41RIIx 9FwLGebDCypxHJkvbmK5oHtjj9a9sBJ0sLC0br4hjzvcCOfiozv1g5xyxU+j28Qd 4hDRkp1pBoW7Rzsq3GiV/vkIWdND3M4Dqmodu5+x9+WxqhQDdYPVsl0GWc6Sneco v5DHYEaHsIjrT8Idn01pruAOK0fyfe/eOPMm1FKTW7amXgR8s+m2hVmWcO7VAWgM CzR9yptNth/cdhN3yzftN66exArZpRkiBK6CaRNktn/sOVqa2LW306ZGyqeVjMo= =hG8t -----END PGP SIGNATURE----- --------------enig298DA3653DB987EC768DAA8B-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 12 13:30:34 2012 Received: (at 10281) by debbugs.gnu.org; 12 Jan 2012 18:30:34 +0000 Received: from localhost ([127.0.0.1]:55375 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RlPQ1-0000K4-Pj for submit@debbugs.gnu.org; Thu, 12 Jan 2012 13:30:34 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]:39896) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RlPPy-0000Jw-Et for 10281@debbugs.gnu.org; Thu, 12 Jan 2012 13:30:31 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 2AE19A60001; Thu, 12 Jan 2012 10:29:57 -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 7nCM2Es6iqGU; Thu, 12 Jan 2012 10:29:56 -0800 (PST) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 72E5839E800C; Thu, 12 Jan 2012 10:29:56 -0800 (PST) Message-ID: <4F0F26A4.3020103@cs.ucla.edu> Date: Thu, 12 Jan 2012 10:29:56 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 MIME-Version: 1.0 To: Eric Blake Subject: Re: bug#10281: [1003.1(2008)/Issue 7 0000527]: du and files found via multiple command line arguments References: <485650011699bf7dfd1933eae6eea221@austingroupbugs.net> <4DD8D2D2-A1FC-43FF-9692-E1F500E96FA5@sonic.net> <4EEC23FD.4030705@redhat.com> <4EEE6345.4050801@cs.ucla.edu> <4F0F1D2E.3000606@redhat.com> In-Reply-To: <4F0F1D2E.3000606@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10281 Cc: Don Cragun , 10281@debbugs.gnu.org, austin-group-l X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) On 01/12/12 09:49, Eric Blake wrote: > It boils down to a decision of whether we want to standardize a useful > behavior, and whether that behavior avoids over-counting, but possibly > invalidating existing implementations (in which case, it is better > targetted to Issue 8), or whether we give up and declare things > unspecified when encountering files with link count of 1 through > multiple locations (in which case we could make the changes in TC2 of > Issue 7, and still make recommendations on the underlying goal of > avoiding over-counting). We can do both, and it makes sense to do both. That is, we can have Issue 7 TC2 specify Option 2B with a suggestion to implement Option 2A, and have Issue 8 require Option 2A. > cpio may have a similar issue on overcounting. Good point; it's likely that many implementations of pax, cpio, and tar have problems in this area. I fixed this bug in GNU tar in 2010, here: http://git.savannah.gnu.org/cgit/tar.git/commit/?id=37ddfb0b7eb41cc3f58bce686d389b1e965e9ccf From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 23 12:14:22 2012 Received: (at 10281) by debbugs.gnu.org; 23 Jan 2012 17:14:22 +0000 Received: from localhost ([127.0.0.1]:40941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RpNTK-00033q-1U for submit@debbugs.gnu.org; Mon, 23 Jan 2012 12:14:22 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]:34824) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RpNTG-00033c-KR for 10281@debbugs.gnu.org; Mon, 23 Jan 2012 12:14:20 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 226BE39E800E; Mon, 23 Jan 2012 09:13:57 -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 BKvZp1VESO0p; Mon, 23 Jan 2012 09:13:56 -0800 (PST) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id B0CF939E800D; Mon, 23 Jan 2012 09:13:56 -0800 (PST) Message-ID: <4F1D9554.908@cs.ucla.edu> Date: Mon, 23 Jan 2012 09:13:56 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 MIME-Version: 1.0 To: austin-group-l Subject: Re: bug#10281: [1003.1(2008)/Issue 7 0000527]: du and files found via multiple command line arguments References: <485650011699bf7dfd1933eae6eea221@austingroupbugs.net> <4DD8D2D2-A1FC-43FF-9692-E1F500E96FA5@sonic.net> <4EEC23FD.4030705@redhat.com> <4EEE6345.4050801@cs.ucla.edu> <4F0F1D2E.3000606@redhat.com> <4F0F26A4.3020103@cs.ucla.edu> In-Reply-To: <4F0F26A4.3020103@cs.ucla.edu> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10281 Cc: 10281@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) On 01/13/2012, Geoff Clare wrote: > One problem with requiring Option 2A is that it requires du to use > much more memory for hierarchies where there are large numbers > of files with link count 1. This could be a problem for embedded > systems in particular. The extra memory shouldn't be needed in the typical case where there is at most one file operand and where -L is not used. In the typical case, du is within its rights to not hash files whose link count is 1, even if Option 2A is required. This is because in the typical case du can't encounter the same file twice if its link count is 1. From debbugs-submit-bounces@debbugs.gnu.org Sun May 20 17:18:42 2012 Received: (at control) by debbugs.gnu.org; 20 May 2012 21:18:42 +0000 Received: from localhost ([127.0.0.1]:35718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SWDWC-0006Fw-2H for submit@debbugs.gnu.org; Sun, 20 May 2012 17:18:42 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:37303) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SWDVp-0006F3-8I; Sun, 20 May 2012 17:18:20 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 54FB239E800C; Sun, 20 May 2012 14:17:21 -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 AmIcGrC4xaUZ; Sun, 20 May 2012 14:17:20 -0700 (PDT) Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 7649339E8008; Sun, 20 May 2012 14:17:20 -0700 (PDT) Message-ID: <4FB95F64.2020601@cs.ucla.edu> Date: Sun, 20 May 2012 14:17:24 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 MIME-Version: 1.0 To: Chris Marusich Subject: Re: bug#11526: "du -s . foo bar" only outputs size of first argument -- versions 8.13, 8.16, and 8.17 (latest) References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: control Cc: 11526@debbugs.gnu.org, control@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) forcemerge 10282 11526 thanks Thanks, but this behavior is expected and is not a bug. We have been looking into ways of addressing the issue, though there's nothing currently active in this area. For more, please see . From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 16 05:05:57 2013 Received: (at submit) by debbugs.gnu.org; 16 Feb 2013 10:05:58 +0000 Received: from localhost ([127.0.0.1]:58588 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U6eeb-0000qB-G8 for submit@debbugs.gnu.org; Sat, 16 Feb 2013 05:05:57 -0500 Received: from eggs.gnu.org ([208.118.235.92]:40635) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U6eeY-0000q3-Np for submit@debbugs.gnu.org; Sat, 16 Feb 2013 05:05:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U6edi-0005Q4-RH for submit@debbugs.gnu.org; Sat, 16 Feb 2013 05:05:07 -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, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:37919) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6edi-0005Py-O7 for submit@debbugs.gnu.org; Sat, 16 Feb 2013 05:05:02 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51988) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6edZ-0003za-RV for bug-coreutils@gnu.org; Sat, 16 Feb 2013 05:05:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U6edU-0005M5-Dv for bug-coreutils@gnu.org; Sat, 16 Feb 2013 05:04:53 -0500 Received: from plane.gmane.org ([80.91.229.3]:52496) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6edU-0005Lz-7P for bug-coreutils@gnu.org; Sat, 16 Feb 2013 05:04:48 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1U6edl-0007Nw-3y for bug-coreutils@gnu.org; Sat, 16 Feb 2013 11:05:05 +0100 Received: from c-24-9-70-72.hsd1.co.comcast.net ([24.9.70.72]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 16 Feb 2013 11:05:05 +0100 Received: from idfah by c-24-9-70-72.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 16 Feb 2013 11:05:05 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-coreutils@gnu.org From: Elliott Forney Subject: Re: bug#10281: change in behavior of du with multiple arguments =?utf-8?b?KGNvbW1pdAllZmU1M2NjKQ==?= Date: Sat, 16 Feb 2013 09:59:59 +0000 (UTC) Lines: 2 Message-ID: References: <4EE64133.6070309@cs.ucla.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 24.9.70.72 (Mozilla/5.0 (X11; Linux i686 on x86_64; rv:18.0) Gecko/20100101 Firefox/18.0) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Does anyone know if anything ever happened with this? Did we get clarification on POSIX? From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 17 01:11:08 2013 Received: (at 10281) by debbugs.gnu.org; 17 Feb 2013 06:11:09 +0000 Received: from localhost ([127.0.0.1]:59928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U6xSp-00030b-CF for submit@debbugs.gnu.org; Sun, 17 Feb 2013 01:11:04 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]:36883) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U6xSj-000309-N5 for 10281@debbugs.gnu.org; Sun, 17 Feb 2013 01:11:01 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 7778939E8108; Sat, 16 Feb 2013 22:10:04 -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 AbRVFCngR0Yh; Sat, 16 Feb 2013 22:10:03 -0800 (PST) Received: from [192.168.1.28] (ip70-178-190-200.ks.ks.cox.net [70.178.190.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 905AB39E8106; Sat, 16 Feb 2013 22:10:03 -0800 (PST) Message-ID: <51207435.2060901@cs.ucla.edu> Date: Sun, 17 Feb 2013 00:09:57 -0600 From: Paul Eggert User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: Elliott Forney Subject: Re: bug#10281: change in behavior of du with multiple arguments (commit efe53cc) References: <4EE64133.6070309@cs.ucla.edu> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.5 (-) X-Debbugs-Envelope-To: 10281 Cc: 10281@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.3 (--) On 02/16/2013 03:59 AM, Elliott Forney wrote: > Does anyone know if anything ever happened with this? Did we get clarification > on POSIX? My reading of is that POSIX allows but does not require the current GNU behavior, and that future versions of POSIX may require the current GNU behavior. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 18 03:19:25 2013 Received: (at 10281) by debbugs.gnu.org; 18 Feb 2013 08:19:25 +0000 Received: from localhost ([127.0.0.1]:33789 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U7Lwa-0001Xs-RF for submit@debbugs.gnu.org; Mon, 18 Feb 2013 03:19:25 -0500 Received: from mail-ie0-f175.google.com ([209.85.223.175]:45805) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U7LwY-0001Xl-JH for 10281@debbugs.gnu.org; Mon, 18 Feb 2013 03:19:24 -0500 Received: by mail-ie0-f175.google.com with SMTP id c12so6799109ieb.20 for <10281@debbugs.gnu.org>; Mon, 18 Feb 2013 00:18:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=Zq0vmJrhWQU/YclNMNN76c5eGRg/JR+Oej7totPPhGE=; b=iXDGVkoH45iOfw+B+PH3C25fGIUQLEebz84oOSCmkkAueryPc0wLU1NwBm+Yzr5nLP h4d61IQgqL9/OY9n04iDcJ4/+8vW/NsFInOqPhRCRsg9mVuQgjoi8pMnXY3Hn3aZEKDA l2MfneV9oynqzAHr+wMqvyFREthlabktsjwDUpZzv+/JBAVmgVXzmZBA8yLpYGoHFNIc hF73hgI583DlUTEA/Y8s0Yrot+rrZE2IKvBj5vTY+dQkDZoU8Ymhj2s+vh3G3KjgXoQq IA100OexOtDsr8TnMaU4YT8IlYsU67fHo6beti+AfKdmXfvGEhrPSaMU1qpMWCL7Tpgz vm5Q== MIME-Version: 1.0 X-Received: by 10.50.37.236 with SMTP id b12mr7012065igk.42.1361175503553; Mon, 18 Feb 2013 00:18:23 -0800 (PST) Received: by 10.50.153.197 with HTTP; Mon, 18 Feb 2013 00:18:23 -0800 (PST) In-Reply-To: <51207435.2060901@cs.ucla.edu> References: <4EE64133.6070309@cs.ucla.edu> <51207435.2060901@cs.ucla.edu> Date: Mon, 18 Feb 2013 01:18:23 -0700 X-Google-Sender-Auth: al8uUNR03IQUJRzinTtF5RNoPMg Message-ID: Subject: Re: bug#10281: change in behavior of du with multiple arguments (commit efe53cc) From: Elliott Forney To: Paul Eggert Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 10281 Cc: 10281@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.1 (/) > My reading of > is that POSIX allows but does not require the current GNU behavior, > and that future versions of POSIX may require the current GNU behavior. Thanks Paul, I agree with your reading of this. Sounds like POSIX allows both the new and old behaviors. I must express, however, that I think this is a case where both the standard and the current implementation were well-intentioned but not well thought out. Please allow me to state some reasons why I am opposed to the current behavior followed by an example. If I fail to persuade people then I will let this issue be. 1. I find it unintuitive that the number in a line of output from du does not necessarily reflect the size of the corresponding directory or file. Without being privy to du's behavior regarding links and multiple command-line arguments, this would be my expectation. 2. Although I can see how it might add functionality to avoid recounting files with a link count greater than one (although I don't find it personally useful) I do not see any added benefit of not recounting files with link count equal to one (e.g., across multiple command-line arguments). This is where I think the implications of the POSIX standard were not well thought out. I think that the intention was to prevent counting files multiple times if there were multiple links to the same file. As an ill-considered side effect of this, and particularly in the current implementation, we now find that du will not recount across multiple command-line arguments. I have an examples of how this is confusing below. 3. I find it surprising that the order of command-line arguments to du may affect the output of du. Users don't expect this. 4. This deviates significantly from other implementations and historical behavior. To my knowledge, gnu-coreutils is the odd-man-out with all other implementations following the previous behavior. 5. I couldn't agree with Bernhard Voelker more: > That reminds me about a real-life question you could ask your little > daughter: "how many pupils are in each class and in total at school?". > I guess you would send her to extra math courses if she said "Class A > has 20, class B and class C have 25 each, and the school has 0." > This example doesn't claim to be 100% relevant for du, but shows > how "counting" and "summarizing" is burnt into human brains. Personally, I think that du should recount links and command-line arguments everywhere except in the total, as reported by the -c flag. This would add to the information reported by du without violating 1 above. Let's consider an example. I have actually had several people in my office confused over variations of this same problem since du's behavior has changed. If several people have come looking for help, this means that many more are confused and, worse yet, some people/scripts probably haven't even caught the inconsistency. Let's say that I want to answer the following question: What are the sizes of the directories "one" and "two" and "two/three" and all of these directories combined. Perhaps I know that "one" and "two" are often too large and that "three" often causes "two" to grow too large. Below is what my first principals would suggest I do. Interestingly, however, I notice that "two/three" is not reported at all. So my question is not answered. $ du -ksc one two two/three 75096 one 4283824 two 4358920 total Next, I might try reversing the order of arguments to see what happens. Now, I see that all are reported. A hurried user might stop here and go about their day. A sly user will notice, however, that "two/three" appears larger than "two" How is this possible?! $ du -ksc one two/three two 75096 one 3184072 two/three 1099752 two 4358920 total So, I might wander down the hall and visit with a friend. He suggests that I use the --count-links flag to allow recounting (even though there are not multiple links in this scenario). Now, everything is reported and the numbers on each line of output match, but what happened to my total? This can't be right, it's larger than my entire disk quota! $ du -ksc --count-links one two two/three 75096 one 4283824 two 3184072 two/three 7542992 total Turns out that --count-links sums all the output, even those that are recounted, yielding an incorrect total. Finally, I break down and use three commands get the answer I was looking for. Not pretty. $ du -ks one two; du -ks two/three; du -ksc one two | tail -1 75096 one 4283824 two 3184072 two/three 4358920 total Is it just me or does anyone else think this is convoluted? From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 18 20:57:59 2013 Received: (at 10281) by debbugs.gnu.org; 19 Feb 2013 01:57:59 +0000 Received: from localhost ([127.0.0.1]:35508 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U7cT0-0006sN-6w for submit@debbugs.gnu.org; Mon, 18 Feb 2013 20:57:58 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]:59574) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U7cSw-0006sD-Fk for 10281@debbugs.gnu.org; Mon, 18 Feb 2013 20:57:56 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 1EAAF39E8108; Mon, 18 Feb 2013 17:56:51 -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 QcbKLdVoCBr9; Mon, 18 Feb 2013 17:56:50 -0800 (PST) Received: from [192.168.1.9] (pool-71-189-154-249.lsanca.fios.verizon.net [71.189.154.249]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 9891F39E8105; Mon, 18 Feb 2013 17:56:50 -0800 (PST) Message-ID: <5122DBE2.10603@cs.ucla.edu> Date: Mon, 18 Feb 2013 17:56:50 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: Elliott Forney Subject: Re: bug#10281: change in behavior of du with multiple arguments (commit efe53cc) References: <4EE64133.6070309@cs.ucla.edu> <51207435.2060901@cs.ucla.edu> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 10281 Cc: 10281@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.8 (----) On 02/18/2013 12:18 AM, Elliott Forney wrote: > I find it unintuitive that the number in a line of output from > du does not necessarily reflect the size of the corresponding > directory or file. That's been true forever. All versions of 'du' do that. For example, with Solaris 11 du: $ ls $ echo xxx >a/f $ ln a/f b/f $ du 16 ./a 8 ./b 32 . $ du a 16 a $ du b 16 b This sort of thing has been the normal behavior since the 1970s and it's unlikely that we'll want to change it now. > I find it surprising that the order of command-line arguments to > du may affect the output of du. Users don't expect this. Also, users might not expect that the order that directory entries are explored can affect the numbers that du outputs. It's the same thing. But we can't and shouldn't change the the directory-entry behavior; and this is an argument that we shouldn't change the behavior for command-line arguments as well. > Is it just me or does anyone else think this is convoluted? Yes, it's convoluted, but complexity is inherent to any file system that has hard links and where 'du' is supposed to count actual and not apparent disk usage. There's no way to escape this complexity entirely: it has to be reported to the user somehow. No matter what method 'du' uses, one will be able to construct confusing examples like the above. So the mere existence of examples that cause confusion is not sufficient evidence that we should change du's behavior. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 19 02:11:02 2013 Received: (at 10281) by debbugs.gnu.org; 19 Feb 2013 07:11:02 +0000 Received: from localhost ([127.0.0.1]:35863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U7hLx-0000Jt-8y for submit@debbugs.gnu.org; Tue, 19 Feb 2013 02:11:01 -0500 Received: from mail-ie0-f182.google.com ([209.85.223.182]:35683) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U7hLu-0000Jk-74 for 10281@debbugs.gnu.org; Tue, 19 Feb 2013 02:10:59 -0500 Received: by mail-ie0-f182.google.com with SMTP id k14so8095818iea.13 for <10281@debbugs.gnu.org>; Mon, 18 Feb 2013 23:09:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=Az7NafqLlRa7HB7ig1hijE+TV2SC7D6PGQwIQqeWC0w=; b=W5f957a/8qyzd4Jei15TkmrGBLrOwx86tQQuelJ1YGCLpYuemRR5L6+fZZTViFCBiV EdRFtOMP7LRF8p4amXDxf1RpPo9RtJz3M1IolfFipvxT18R3Eo4o7sk2TykESn2Gd0EE 3x48KokBjQi/YvROlDPwELIbs4W6EunlKPyxpzaDCk7EhqF2/aRKmo6rtpFPEEfi9TTw K4MbRi10QA+tywP7i7SUDrVCeVGgxrdXmHO7XeivY1uuWrkkgvxJcLwihZg14edS4nhw gnZ00SoQWjvYyrLpQFsFJ+MsbC4i0P310GppB14ZUaCfYuua7wbbujimJeTY5cegd+HG G9jA== MIME-Version: 1.0 X-Received: by 10.50.153.165 with SMTP id vh5mr7944076igb.48.1361257793303; Mon, 18 Feb 2013 23:09:53 -0800 (PST) Received: by 10.50.153.197 with HTTP; Mon, 18 Feb 2013 23:09:53 -0800 (PST) In-Reply-To: <5122DBE2.10603@cs.ucla.edu> References: <4EE64133.6070309@cs.ucla.edu> <51207435.2060901@cs.ucla.edu> <5122DBE2.10603@cs.ucla.edu> Date: Tue, 19 Feb 2013 00:09:53 -0700 X-Google-Sender-Auth: 34clBYW_LKIF-yXlCG6jeBUUCtc Message-ID: Subject: Re: bug#10281: change in behavior of du with multiple arguments (commit efe53cc) From: Elliott Forney To: Paul Eggert Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 10281 Cc: 10281@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.7 (/) > That's been true forever. All versions of 'du' do that. > For example, with Solaris 11 du: > > $ ls > $ echo xxx >a/f > $ ln a/f b/f > $ du > 16 ./a > 8 ./b > 32 . > $ du a > 16 a > $ du b > 16 b The example you give is different in one important way: it involves multiple hard links. The example I gave involved only nested directories. With Solaris du, each line corresponds to the file/directory size given that there are not multiple links: $ mkdir one one/two $ echo xxx > one/two/f $ du -s one one/two 12 one 8 one/two $ du -s one/two one 8 one/two 12 one Whereas in gnu du we now have: $ du -s one one/two 12 one $ du -s one/two one 8 one/two 4 one I guess part of the reason I see this so much is that I tend to use the -s option to get the summary sizes of a list of directories and sometimes they are nested. I really think this is the most common usage for users. > This sort of thing has been the normal behavior since the > 1970s and it's unlikely that we'll want to change it now. The behavior that we've had since the 70's was changed in the recent release of du. That's the whole reason this bug report popped up. I will admit, however, that I sometimes think we should all be more open to changes but, in this case, I think the change is more confusing. > Also, users might not expect that the order that directory entries > are explored can affect the numbers that du outputs. It's the same thing. > But we can't and shouldn't change the the directory-entry behavior; > and this is an argument that we shouldn't change the behavior for > command-line arguments as well. Yes, this is a justification for having the order of arguments matter, but only if one concedes that multiple command-line arguments should not be recounted. > No matter what method 'du' uses, one will be > able to construct confusing examples like the above. So the > mere existence of examples that cause confusion is not sufficient > evidence that we should change du's behavior. Of course convoluted examples can always be constructed, but the example I gave should not be overly complex. It is a typical use case. It really boils down to whether or not multiple command line arguments should be recounted. There is no question in my mind about recounting multiple links (not recounting links is the historical behavior if for no other reason). From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 19 11:38:44 2013 Received: (at 10281) by debbugs.gnu.org; 19 Feb 2013 16:38:44 +0000 Received: from localhost ([127.0.0.1]:37118 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U7qDL-0007GV-MZ for submit@debbugs.gnu.org; Tue, 19 Feb 2013 11:38:44 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]:60195) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U7qDJ-0007GO-JZ for 10281@debbugs.gnu.org; Tue, 19 Feb 2013 11:38:42 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 3FA73A60003; Tue, 19 Feb 2013 08:37:35 -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 xmw82lqRjqyN; Tue, 19 Feb 2013 08:37:34 -0800 (PST) Received: from [192.168.1.9] (pool-71-189-154-249.lsanca.fios.verizon.net [71.189.154.249]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id D950339E8105; Tue, 19 Feb 2013 08:37:34 -0800 (PST) Message-ID: <5123AA4E.4020308@cs.ucla.edu> Date: Tue, 19 Feb 2013 08:37:34 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: Elliott Forney Subject: Re: bug#10281: change in behavior of du with multiple arguments (commit efe53cc) References: <4EE64133.6070309@cs.ucla.edu> <51207435.2060901@cs.ucla.edu> <5122DBE2.10603@cs.ucla.edu> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 10281 Cc: 10281@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.9 (--) On 02/18/2013 11:09 PM, Elliott Forney wrote: > There is no question in my mind about recounting > multiple links (not recounting links is the historical behavior if for > no other reason). Unfortunately if memory serves that's not the case either. In non-GNU implementations, multiple links are sometimes counted and sometimes not. If you run 'du a b' and a/f and b/f are hard links, they might be counted twice, and might not be -- it depends on the implementation. The area is indeed a mess and no matter what GNU du does it will disagree with somebody. It might be reasonable to add an option to GNU du to have it mimic the behavior you prefer, if we can nail down exactly what that is. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 19 18:27:29 2013 Received: (at 10281) by debbugs.gnu.org; 19 Feb 2013 23:27:29 +0000 Received: from localhost ([127.0.0.1]:37542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U7wau-000284-Hz for submit@debbugs.gnu.org; Tue, 19 Feb 2013 18:27:29 -0500 Received: from mail-ie0-f180.google.com ([209.85.223.180]:38903) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U7was-00027x-CA for 10281@debbugs.gnu.org; Tue, 19 Feb 2013 18:27:27 -0500 Received: by mail-ie0-f180.google.com with SMTP id bn7so9392129ieb.11 for <10281@debbugs.gnu.org>; Tue, 19 Feb 2013 15:26:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=bEJnbWo9QiLR/u9hXNqB1z3RmL9pGIZXHCpJ/TDvwvs=; b=lj2wHFdRyyz0NbtJZGZa+dzewx+EQ6uA8DfpxL5WbFjOGxDNjQ8Tolw+vl6WaD+hR9 KD/mQ4RR8ztLU8HoFj8ylC9RkTzi7JvpT4TDfs9PiGI3hn1XR/zp5JagvVzal1xrwUat Vz/2rcQVJo/ZxXQKjd4NulJf6LZorYKGdMzV+0AnHBnxeQsNGiiymm+J/Rf1W7bOsyBw gqykMLIwKfSTw/uiX7pglArJCIVQ3uMXlc9H2+pKuoFJDY2+Hw0AsO98/DumHZtL3sNL B9bjhqJ9Dh5flDJ1/hN9rdJuMqvcp8h3kOWk4fqrrEXCjBFRJqivtvfuNIY6/ZbwdJp7 c+ig== MIME-Version: 1.0 X-Received: by 10.50.37.236 with SMTP id b12mr10285988igk.42.1361316377927; Tue, 19 Feb 2013 15:26:17 -0800 (PST) Received: by 10.50.153.197 with HTTP; Tue, 19 Feb 2013 15:26:17 -0800 (PST) In-Reply-To: <5123AA4E.4020308@cs.ucla.edu> References: <4EE64133.6070309@cs.ucla.edu> <51207435.2060901@cs.ucla.edu> <5122DBE2.10603@cs.ucla.edu> <5123AA4E.4020308@cs.ucla.edu> Date: Tue, 19 Feb 2013 16:26:17 -0700 X-Google-Sender-Auth: w9jEg0o5J-SUwb_jTQ8tv_AByRI Message-ID: Subject: Re: bug#10281: change in behavior of du with multiple arguments (commit efe53cc) From: Elliott Forney To: Paul Eggert Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 10281 Cc: 10281@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.7 (/) > Unfortunately if memory serves that's not the case either. > In non-GNU implementations, multiple links are sometimes counted > and sometimes not. If you run 'du a b' and a/f and b/f > are hard links, they might be counted twice, and might not be -- it > depends on the implementation. I wasn't aware of that, sounds like there have been inconsistencies for a long time. > The area is indeed a mess and no matter what GNU du does it will > disagree with somebody. Sure. As you stated before, filesystems are inherently complex, especially when links are allowed. I agree with that. I apologize if I am being difficult. I just want to be sure this discussion is had because it seems like this is a significant change in behavior. It does make sense, it just doesn't feel intuitive to me. > It might be reasonable to add an option to GNU du to have it mimic > the behavior you prefer, if we can nail down exactly what that is. Well, what really bothers me is the second command below. $ du -ks tmp tmp/bash 1033864 tmp $ du -ks tmp/bash tmp 182684 tmp/bash 851180 tmp The size of tmp is underrepresented even though there are no links. To be honest, however, I can't think of a good way around this. It would be nice to simply omit tmp/bash since it is in a directory under another argument but I'm unsure how that would be achieved without making things even more convoluted and less efficient. I am at a loss. Once a user is aware of what is going on, the problem can be avoided either by using multiple du commands or by using --count-links and understanding that any totals and links may be overcounted. If you are confident this is the best way to go forward then I can live with it. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 20 05:16:43 2013 Received: (at 10281) by debbugs.gnu.org; 20 Feb 2013 10:16:43 +0000 Received: from localhost ([127.0.0.1]:38692 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U86jC-0001m6-Me for submit@debbugs.gnu.org; Wed, 20 Feb 2013 05:16:43 -0500 Received: from ishtar.tlinx.org ([173.164.175.65]:57541 helo=Ishtar.sc.tlinx.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U86jA-0001lz-N4 for 10281@debbugs.gnu.org; Wed, 20 Feb 2013 05:16:41 -0500 Received: from [192.168.4.12] (Athenae [192.168.4.12]) by Ishtar.sc.tlinx.org (8.14.5/8.14.4/SuSE Linux 0.8) with ESMTP id r1KAFPfC021633; Wed, 20 Feb 2013 02:15:27 -0800 Message-ID: <5124A23D.1070100@tlinx.org> Date: Wed, 20 Feb 2013 02:15:25 -0800 From: Linda Walsh User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Gecko/20100228 Lightning/0.9 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: Elliott Forney Subject: Re: bug#10281: change in behavior of du with multiple arguments (commit efe53cc) References: <4EE64133.6070309@cs.ucla.edu> <51207435.2060901@cs.ucla.edu> <5122DBE2.10603@cs.ucla.edu> <5123AA4E.4020308@cs.ucla.edu> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 10281 Cc: 10281@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.6 (/) Elliott Forney wrote: > $ du -ks tmp tmp/bash > 1033864 tmp > > $ du -ks tmp/bash tmp > 182684 tmp/bash > 851180 tmp > > The size of tmp is underrepresented even though there are no links. > ---- Is it? I mean is it showing less space that the sum of the files in the tmp dir exclusive of the directory you singled out for a separate totally? I.e. by singling out tmp/bash, it could easily be taken that you want it be be tallied separately from tmp and not have it's space included -- vs. the way you seem to want it -- which would be to provide a total. In the specific example you show, du -cks shows what you want, but easily might not depending on your args. The only way to do what you want would be to have a running tree mode, where another column displays. a running total for the dirs you specified that has 1 column being a total of everything under it, and a 2nd column that shows that total with any dirs specified on the command line removed from the tally: Ex: supposed we have dirs w/sizes of files in the dirs a:100 a/b:100, a/c:100, a/d:100, a/b/e:100 a2:100 --- If I specified: du [some-trigger-arg] a/b/e a/b a a2 100 100 a/b/e 200 100 a/b 500 300 a #** 100 100 a2 ** 2nd number includes dirs 'c' and 'd' as they were not mentioned separately. I'm not sure what the cost/benefit ratio is on this, at this time... might rise. Though you'd also have to be specific -- what would happen if the files in a/b/e were hard links to 'a'... output could still be different than what you wanted. Maybe a perl script to munge the output? then an alias and/or function to call your extension when you wanted? alias would be easy, but if you wanted to get fancy, you could make a: function du_special } function du { .. if flag1=myflag, run du_special else 'du' "$@" ## run real du... } I asked for the -h on sort about 5-6 years ago, but no one wanted it then... now it's just there. Unfortunately I find that I'm often some number of years ahead of where critical mass to have something happen is...;-/ Just some random suggesting... From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 15 11:03:27 2018 Received: (at 10281) by debbugs.gnu.org; 15 Oct 2018 15:03:27 +0000 Received: from localhost ([127.0.0.1]:50925 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gC4P1-000677-ID for submit@debbugs.gnu.org; Mon, 15 Oct 2018 11:03:27 -0400 Received: from mail-pf1-f177.google.com ([209.85.210.177]:37578) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gC4Oz-00066p-ME; Mon, 15 Oct 2018 11:03:26 -0400 Received: by mail-pf1-f177.google.com with SMTP id j23-v6so9817940pfi.4; Mon, 15 Oct 2018 08:03:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:cc:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=gjMLzo04dDb92of69bppwHovWbW/unMKFCbLg50iFvk=; b=BQ/VyYVC4wTODPFClMuwi23MyM8VD+BUP4p294ukcYauJ8zcTDvjDqKglBe1+xBPFI +NlZWOhZAp6SFRvKLwMBRyzzvpRCaXFOzp8Kfz751unB6CPcwZ2UJ/Yc37v4MQYvuLUg qsghf/0NSh54gX/7A3sMU7ktqnQszq2FInRl+RzoCKcksPDMfPG2ISj8jt7hHrLcGm7g YMYd7YPW9AnaUEEa0bywLP4Dlx42LPpUaui0QO5PZpCWqG6uCGtT10NA83dfEdtKFECX 9Miu59dhDNEtmM0Ee355Drnp9D6JB/c7HBblXIzUYQkeQPlECEpxa7Yo32MJH4NwJOR0 t0Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=gjMLzo04dDb92of69bppwHovWbW/unMKFCbLg50iFvk=; b=BPpZcXZfV6tqJwf59fBTa9NaVaVmQd1srIMjPYTp7syOw0qBjMVTasEpccZJlumy2e ian14ERJLWj7DlvRVvJkfLyKe7rMEiT1hXY6V+atJUxSToOAB7EfPGpN8QXfcCSZ34aY ckiqDSWs8CAgOxP9eiHOdr8yeedkS/GIUIG1cdkZM0L/MDxvK4hx6w5Y73LIItuJEvtW 0SFo7yq7+eeviJKu3Uwgy6YjysKjgKCRQb+MwCJh5NNnCKVQdxmyG1l+d+WApdSfkAqW i2Gt/cJkcI2rVKwq4Q0iRxHrZ46ubhlVeUDi7RNovGaVHsQeWbHc5KHaPfH2KCYmPWW3 Cy6A== X-Gm-Message-State: ABuFfogDmuziOgI58rSUO5NougbwB3CAQ7A4ZvI4UbIe9aKX7qW54+hH 0tNbf0POu8dT74YLQejJvO4u04zCuKk= X-Google-Smtp-Source: ACcGV63uNFSoaoCQdyJPb4ppDWeW2byaXAv3mBqmQiFifztq2aXaNAmRkL4rYJul4BIL5zWEKWxmZw== X-Received: by 2002:aa7:8001:: with SMTP id j1-v6mr17712551pfi.73.1539615798921; Mon, 15 Oct 2018 08:03:18 -0700 (PDT) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id g88-v6sm16283473pfd.181.2018.10.15.08.03.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Oct 2018 08:03:17 -0700 (PDT) Subject: Re: bug#10281: change in behavior of du with multiple arguments (commit efe53cc) References: <4EE64133.6070309@cs.ucla.edu> <51207435.2060901@cs.ucla.edu> <5122DBE2.10603@cs.ucla.edu> <5123AA4E.4020308@cs.ucla.edu> <5124A23D.1070100@tlinx.org> From: Assaf Gordon Message-ID: <5943df53-cebe-5db0-67b4-1a1b9d56c169@gmail.com> Date: Mon, 15 Oct 2018 09:03:16 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <5124A23D.1070100@tlinx.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 1.2 (+) 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: severity 10281 wishlist tags 10281 wontfix retitle 10281 du: hard-links counting with multiple arguments (commit efe53cc) close 10281 (triaging old bugs) [...] On 18/02/13 01:18 AM, Elliott Forney wrote: >> My reading of >> is that POSIX allows but does not require the current GNU behavior, >> and that future versions of POSIX may require the current GNU behavior. > > Thanks Paul, I agree with your reading of this. Sounds like POSIX > allows both the new and old behaviors. [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.2 MISSING_HEADERS Missing To: header 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_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.210.177 listed in list.dnswl.org] X-Debbugs-Envelope-To: 10281 Cc: 10281@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: 0.2 (/) severity 10281 wishlist tags 10281 wontfix retitle 10281 du: hard-links counting with multiple arguments (commit efe53cc) close 10281 (triaging old bugs) [...] On 18/02/13 01:18 AM, Elliott Forney wrote: >> My reading of >> is that POSIX allows but does not require the current GNU behavior, >> and that future versions of POSIX may require the current GNU behavior. > > Thanks Paul, I agree with your reading of this. Sounds like POSIX > allows both the new and old behaviors. Long and interesting thread about du, hard-links, and POSIX interpretations, but with no follow-up in 5 years and no change in du's behavior, I'm closing this bug. regards, - assaf From unknown Wed Sep 10 12:53:41 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, 13 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