Subject: Re: bug#11526: "du -s . foo bar" only outputs size of first argument -- versions 8.13, 8.16, and 8.17 (latest)

From: Chris Marusich <[email-masked]>
Date: Sun, 20 May 2012 22:50:27 -0700

After reviewing the manual more closely, it seems I would have gotten
the behavior I expected with du -sl.  What do you think about updating
the documentation to read as follows?

‘-s’
‘--summarize’
Display only a summary of the arguments.   Unless -l is also
specified, not all arguments will necessarily appear in the output
(e.g., du -s foo foo/bar will not output a line for foo/bar), and not
every size printed next to a directory in the output will necessarily
reflect the total size of that directory including its contents (e.g.,
du -s foo/bar foo will output the total size of foo including its
contents minus the size of foo/bar).  This behavior is POSIX-compliant
and allows us to use -c to get an idea of the total size of all the
arguments taken together.

The last line could perhaps be optional.  I'd just like the docs to
have a clear explanation that helps prevent future confusion.

On Sun, May 20, 2012 at 5:29 PM, Paul Eggert <[email-masked]> wrote:
>
> On 05/20/2012 03:18 PM, Chris Marusich wrote:
> > the behavior contrasts with the description of -s
> > ("display only a total for each argument" ...)
>
> We could change that "total" to "summary".
>
> The --help output (man page) currently doesn't discuss
> this issue in detail, because it's not really set up for
> long discussions.  There is something in the manual about
> this, if that helps.