From unknown Sun Jun 22 17:10:18 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#7439 <7439@debbugs.gnu.org> To: bug#7439 <7439@debbugs.gnu.org> Subject: Status: du failing at "du -sh . *" Reply-To: bug#7439 <7439@debbugs.gnu.org> Date: Mon, 23 Jun 2025 00:10:18 +0000 retitle 7439 du failing at "du -sh . *" reassign 7439 coreutils submitter 7439 Mathias Linnemann-Emden severity 7439 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 18 20:06:50 2010 Received: (at submit) by debbugs.gnu.org; 19 Nov 2010 01:06:50 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PJFRC-0000Am-3r for submit@debbugs.gnu.org; Thu, 18 Nov 2010 20:06:50 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PJFNh-00008w-14 for submit@debbugs.gnu.org; Thu, 18 Nov 2010 20:03:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PJFSb-0003H6-Os for submit@debbugs.gnu.org; Thu, 18 Nov 2010 20:08:18 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:35977) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PJFSb-0003H1-Mp for submit@debbugs.gnu.org; Thu, 18 Nov 2010 20:08:17 -0500 Received: from [140.186.70.92] (port=42665 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PJFSa-0002mv-QW for bug-coreutils@gnu.org; Thu, 18 Nov 2010 20:08:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PJFSZ-0003Gq-G7 for bug-coreutils@gnu.org; Thu, 18 Nov 2010 20:08:16 -0500 Received: from helixnetworks.de ([94.23.26.215]:36860) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PJFSZ-0003Gi-Bi for bug-coreutils@gnu.org; Thu, 18 Nov 2010 20:08:15 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by helixnetworks.de (Postfix) with ESMTP id 26266489DD for ; Fri, 19 Nov 2010 02:08:13 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at ns367589.ovh.net Received: from helixnetworks.de ([127.0.0.1]) by localhost (ns367589.ovh.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id y+CagRqePvu0 for ; Fri, 19 Nov 2010 02:08:12 +0100 (CET) Received: from scratchy.linnemann.lan (p54A5A347.dip.t-dialin.net [84.165.163.71]) by helixnetworks.de (Postfix) with ESMTPSA id 852D848561 for ; Fri, 19 Nov 2010 02:08:12 +0100 (CET) Date: Fri, 19 Nov 2010 02:08:11 +0100 From: Mathias Linnemann-Emden To: bug-coreutils@gnu.org Subject: du failing at "du -sh . *" Message-ID: <20101119020811.2d6dbe49@scratchy.linnemann.lan> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.22.0; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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, 2) X-Spam-Score: -6.6 (------) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 18 Nov 2010 20:06:48 -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: -6.6 (------) Hey there, I don't know for sure if this is a bug in 'du' or not - but I've requested several people to test it and we all get the same results: $ mkdir du_test $ cd du_test/ $ touch a b c d $ echo "11111111" >e $ du -sh . * 8,0K . $ du -sh * . 0 a 0 b 0 c 0 d 4,0K e 4,0K . $=20 So not only the output of "du -sh . *" is wrong (not showing du for *), but also the output of "du -sh * ." is incorrect (showing only 4K instead of 8K for "."). I use bash as my shell, but this also happens with sh, zsh, and several other shells i've tried so far. the version of coreutils I run is: $ du --version du (GNU coreutils) 8.7 Copyright =A9 2010 Free Software Foundation, Inc. We've found out that the behaviour of du from coreutils 8.6 and below is as expected: $ mkdir du_test $ cd du_test/ $ touch a b c d $ echo "11111111" >e $ du -sh . * 8,0K . 0 a 0 b 0 c 0 d 4,0K e $ du -sh * . 0 a 0 b 0 c 0 d 4,0K e 8,0K . $=20 I'm using ArchLinux with kernel 2.6.35-ARCH #1 SMP (x86_64). Filesystem is ext4. The bug also is present on ext3, btrfs and ext2 filesystems (I don't know if this might be of any relevance). Please feel free to respond if you should have any further questions.=20 Cheers Mathias Linnemann-Emden From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 19 11:47:36 2010 Received: (at 7439-done) by debbugs.gnu.org; 19 Nov 2010 16:47:36 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PJU7c-0000qS-1A for submit@debbugs.gnu.org; Fri, 19 Nov 2010 11:47:36 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PJU7Z-0000qI-Eo for 7439-done@debbugs.gnu.org; Fri, 19 Nov 2010 11:47:34 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 595FD39E814F; Fri, 19 Nov 2010 08:52:40 -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 N84+pbrA7lMd; Fri, 19 Nov 2010 08:52:39 -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 DB5B439E814E; Fri, 19 Nov 2010 08:52:39 -0800 (PST) Message-ID: <4CE6AB57.8040003@cs.ucla.edu> Date: Fri, 19 Nov 2010 08:52:39 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: Mathias Linnemann-Emden Subject: Re: bug#7439: du failing at "du -sh . *" References: <20101119020811.2d6dbe49@scratchy.linnemann.lan> In-Reply-To: <20101119020811.2d6dbe49@scratchy.linnemann.lan> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 7439-done Cc: 7439-done@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 11/18/2010 05:08 PM, Mathias Linnemann-Emden wrote: > So not only the output of "du -sh . *" is wrong (not showing du for *), > but also the output of "du -sh * ." is incorrect (showing only 4K > instead of 8K for "."). NEWS lists this as a bug fix in release 8.6: du no longer multiply counts a file that is a directory or whose link count is 1, even if the file is reached multiple times by following symlinks or via multiple arguments. The idea is that a single invocation of du never counts the same file twice. This was always true for files with multiple hard links (you probably didn't notice that), and now it's consistent for all files. To get something like the old behavior, you can use "du -l", or invoke "du" separately for each file (depending on how you want hard links treated). From unknown Sun Jun 22 17:10:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 18 Dec 2010 12:24:04 +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