GNU bug report logs - #10281
du: hard-links counting with multiple arguments (commit

Previous Next

Package: coreutils;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Mon, 12 Dec 2011 18:02:02 UTC

Severity: wishlist

Tags: wontfix

Merged with 10282, 11526

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Alan Curry" <pacman-cu <at> kosh.dhis.org>
To: 10281 <at> debbugs.gnu.org
Cc: Elliott Forney <elliott.forney <at> gmail.com>
Subject: bug#10281: change in behavior of du with multiple arguments (commit
Date: Wed, 14 Dec 2011 16:54:19 -0500 (GMT+5)
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




This bug report was last modified 6 years and 303 days ago.

Previous Next


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