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

Previous Next

Package: coreutils;

Reported by: Kamil Dudka <kdudka <at> redhat.com>

Date: Mon, 12 Dec 2011 20:05:02 UTC

Severity: wishlist

Tags: wontfix

Merged with 10281, 11526

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

Bug is archived. No further changes may be made.

Full log


Message #19 received at 10282 <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Kamil Dudka <kdudka <at> redhat.com>, Eric Blake <eblake <at> redhat.com>,
	10282 <at> debbugs.gnu.org
Subject: Re: bug#10282: change in behavior of du with multiple arguments
	(commit efe53cc)
Date: Tue, 13 Dec 2011 08:09:08 +0100
Paul Eggert wrote:

> On 12/12/11 14:58, Eric Blake wrote:
>> "Files with multiple links shall be counted and written for only one
>> entry. The directory entry that is selected in the report is unspecified."
>
> Yes, that's partly what motivates the current GNU du behavior:
> the idea is to implement this notion consistently (historical
> 'du' implementations do not).
>
>> But even historically, command line arguments were always listed, even
>> if they are otherwise multiple links.
>
> I suppose we could change GNU 'du' to output "0 X" for a command-line
> argument X that's already been seen.

This seems sensible.

> This wouldn't address the problem
> perceived by the original poster, though.  And it's a glitch from the
> point of view of consistency.

I agree that printing "0 X" for these seems inconsistent with the
elision mandated for the second and subsequent encounter of a file,
but I suppose command line arguments are intrinsically different
enough that handling them specially makes sense.  Maybe even as
the default.

> Perhaps 'du' needs a new option to control what to do with
> files that 'du' has already seen before. something that
> generalizes --count-links.

That sounds like a good way to do it.
Anyone interested?




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.