du man page -- explanation about --separate-dirs too terse

Bug #1187044 reported by ill
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
coreutils (Ubuntu)
Triaged
Low
Unassigned

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.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1187044/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Revision history for this message
Logan Rosen (logan) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This bug did not have a package associated with it, which is important for ensuring that it gets looked at by the proper developers. You can learn more about finding the right package at https://wiki.ubuntu.com/Bugs/FindRightPackage . I have classified this bug as a bug in coreutils.

When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://help.ubuntu.com/community/ReportingBugs.

affects: ubuntu → coreutils (Ubuntu)
Revision history for this message
C de-Avillez (hggdh2) wrote :

Please:

1. state your Ubuntu, and coreutils, versions:
lsb_release -a
du --version (or dpkg -l coreutils)

2. provide an example of the error, with the command as executed, and the output; also state/show what you expected.

3. use 'ubuntu-bug' to open new bugs -- doing so would eliminate the need for question (1) above.

Changed in coreutils (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
ill (illumilore) wrote :

$ du --version
du (GNU coreutils) 8.20
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Torbjörn Granlund, David MacKenzie, Paul Eggert,
and Jim Meyering.$ lsb_release -a
LSB Version: core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch
Distributor ID: Ubuntu
Description: Ubuntu 13.04
Release: 13.04
Codename: raring

I expected it to only do the first level directories, as the man page says it would

Changed in coreutils (Ubuntu):
status: Incomplete → New
Revision history for this message
C de-Avillez (hggdh2) wrote :

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
Revision history for this message
ill (illumilore) wrote :

The man page being deceptive is still a bug. The -S part should be fixed so that it actually means what the command does. "do not include size of subdirectories" has a different meaning from "separate directories".

Changed in coreutils (Ubuntu):
status: Invalid → New
Revision history for this message
C de-Avillez (hggdh2) wrote :

I can agree that the brief explanation on the man page is too terse. I will ask about it upstream.

summary: - du command does not work properly
+ du man page -- explanation about --separate-dirs too terse
Revision history for this message
C de-Avillez (hggdh2) wrote :

Upstream has proposed a new wording, and will commit the changes soon. for reference, the proposed patch has been attached here. This patch should be included in the next upstream release of coreutils (8.22, perhaps); it will eventually land on a future Ubuntu release.

As such, marking Triaged.

Changed in coreutils (Ubuntu):
status: New → Triaged
Revision history for this message
C de-Avillez (hggdh2) wrote :

For the record, my previous comment #5 was also incorrect: --separate-dirs will not include size of *subdirectories* in the size of the currently-being-processed directory.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "proposed (still to be committed) upstream patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.