GNU bug report logs -
#17546
Problem with du
Previous Next
Reported by: worley <at> alum.mit.edu (Dale R. Worley)
Date: Thu, 22 May 2014 00:18:02 UTC
Severity: normal
Tags: notabug
Merged with 21926
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: Paul Eggert <eggert <at> cs.ucla.edu>
> As far as I can see, POSIX doesn't allow the old behavior, but does
> allow the new one.
I looked at what I think is the Posix spec for du
(http://pubs.opengroup.org/onlinepubs/9699919799/utilities/du.html#tag_20_36),
and I don't see anything that covers the situation one way or another,
but there may be additional relevant information that I'm not aware
of.
> > This leads to startlingly odd behaviors
>
> Any choice of behavior for 'du' will lead to odd behaviors sometimes,
> and there's no way we can make everybody happy in all cases. There is
> an important technical advantage of du's current behavior, though; you
> can get the behavior you prefer by running "du X; du Y". If we chaned
> du to reset itself between command-line arguments, there'd be no way to
> get the behavior I prefer, which is to count files just once.
OTOH, what I want "du *" to generate has to be done with "for F in * ;
do du $F ; done", which is pretty annoying.
I'd like to suggest adding another option to du to establish the
behavior I want. It would be a weaker-grade of -l. (I shouldn't have
any trouble writing the code for that.) Also, I think a few
additional sentences in the manual page would make du's behavior
clearer.
Dale
This bug report was last modified 6 years and 214 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.