[Bug 1187044] Re: du command does not work properly
C de-Avillez
hggdh2 at ubuntu.com
Wed Jun 5 19:03:57 UTC 2013
Actually, the man page does not state that --separete-dirs will only
work on the first level subdirectories. It says:
-S, --separate-dirs
do not include size of subdirectories
info coreutils 'du invocation' expands this to:
`-S'
`--separate-dirs'
Normally, in the output of `du' (when not using `--summarize'),
the size listed next to a directory name, D, represents the sum of
sizes of all entries beneath D as well as the size of D itself.
With `--separate-dirs', the size reported for a directory name, D,
is merely the `stat.st_size'-derived size of the directory entry,
D.
So what --separate-dirs does is *not* count the specific directory size
in the total for the directory.
What you want seems to be '--max-depth' (gives totals for directories
down to max-depth from the CWD or provided anchor). For example, 'du
--max-depth=1' will total on the immediate subdirectories from the CWD.
As such, closing INVALID (not a bug).
** Changed in: coreutils (Ubuntu)
Status: New => Invalid
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to coreutils in Ubuntu.
https://bugs.launchpad.net/bugs/1187044
Title:
du command does not work properly
Status in “coreutils” package in Ubuntu:
Invalid
Bug description:
When using the command "du --separate-dirs", subdirectories are still
included in the results even thought the man page says that they
should not.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/1187044/+subscriptions
More information about the foundations-bugs
mailing list