GNU bug report logs - #7439
du failing at "du -sh . *"

Previous Next

Package: coreutils;

Reported by: Mathias Linnemann-Emden <bier <at> kaffeecontrol.de>

Date: Fri, 19 Nov 2010 01:07:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 7439-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Mathias Linnemann-Emden <bier <at> kaffeecontrol.de>
Cc: 7439-done <at> debbugs.gnu.org
Subject: Re: bug#7439: du failing at "du -sh . *"
Date: Fri, 19 Nov 2010 08:52:39 -0800
On 11/18/2010 05:08 PM, Mathias Linnemann-Emden wrote:
> So not only the output of "du -sh . *" is wrong (not showing du for *),
> but also the output of "du -sh * ." is incorrect (showing only 4K
> instead of 8K for ".").

NEWS lists this as a bug fix in release 8.6:

  du no longer multiply counts a file that is a directory or whose
  link count is 1, even if the file is reached multiple times by
  following symlinks or via multiple arguments.

The idea is that a single invocation of du never counts the same
file twice.  This was always true for files with multiple hard
links (you probably didn't notice that), and now it's consistent
for all files.

To get something like the old behavior, you can use "du -l",
or invoke "du" separately for each file (depending on how you
want hard links treated).




This bug report was last modified 14 years and 190 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.