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



Reply via email to