Thanks for the report.

I'm not sure that's a bug, since the standard does say not to print
or count sizes for files whose sizes have already been counted, so when
it encounters each subdirectory for the second time, it refrains from
counting it.

You can work around it if you use the --count-links (-l) option, but with
the caveats that `du -l -s --total  ./ ./*/' reports double the space
used in `.', and counts the size of every file, even if it encounters
the same hard-linked file several times.

Since the existing behavior is so counter-intuitive, I'll probably change
it (or at least provide an option) so that with -s, each argument gets the
total you'd see if you ran `du -s' on that argument alone, yet the grand
total (from --total) will be accurate (it will not over-count hard-linked
files, or directories traversed more than once).  However, even that
will result in counter-intuitive output when there are `overlapping'
arguments as in your example, because the reported `Total' will end up
being smaller than the sum of the individual sizes.

[EMAIL PROTECTED] writes:
| forwarded 10430 [EMAIL PROTECTED]
| thanks
|
| This is a bug from the Debian Bug System, please take a look at it thanks.
| Its web page is
| http://cgi.debian.org/cgi-bin/bugreport.cgi?archive=no&bug=10430
|
| The reporter complains that the first command below should look
| just like the second but with a total.
|
| [fileutils-4.0s]$ du -s -c  ./ ./*/
| 15341   .
| 15341   total
| [fileutils-4.0s]$ du -s   ./ ./*/
| 15341   .
| 528     ./doc
| 3213    ./inst
| 160     ./intl
| 2494    ./lib
| 181     ./m4
| 126     ./man
| 2618    ./po
| 4285    ./src
| 362     ./tests
| [fileutils-4.0s]$

Reply via email to