bugGNU Core Utilities - Bugs: bug #10397, unexpected du output

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #10397: unexpected du output

Submitted by:  None
Submitted on:  Wed 15 Sep 2004 03:09:37 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Tue 21 Dec 2004 07:25:47 AM UTC, comment #2:

I can reproduce this bug with coreutils 5.2.1, but not with CVS coreutils. So I guess the bug has been fixed.

Paul Eggert <eggert>
Project Administrator
Wed 15 Sep 2004 04:16:11 PM UTC, comment #1:

I'm increasingly convinced this is a bug. Argument order appears to be at the root of the problem. I've attached a test script. While a user listing all directories isn't very realistic, listing a parent directory and only one or two child directories isn't unreasonable. Output on my system is:

-----
command: du -sh dutest dutest/dir1 dutest/dir2 dutest/dir2/dira
-----
28K dutest
4.0K dutest/dir1
16K dutest/dir2
8.0K dutest/dir2/dira
-----

-----
command: du -sh dutest/dir2/dira dutest/dir2 dutest/dir1 dutest
-----
8.0K dutest/dir2/dira
16K dutest/dir2
4.0K dutest/dir1
28K dutest
-----

-----
command: du -csh dutest dutest/dir1 dutest/dir2 dutest/dir2/dira
-----
28K dutest
40K total
-----

-----
command: du -csh dutest/dir2/dira dutest/dir2 dutest/dir1 dutest
-----
8.0K dutest/dir2/dira
12K dutest/dir2
4.0K dutest/dir1
16K dutest
40K total
-----

Anonymous
Wed 15 Sep 2004 03:09:37 PM UTC, original submission:

I run du on the same directory using three different methods and get different output. I, obviously, understand why the total is different when .. isn't included, but I don't understand why directories (e.g. .cpan, .vim, and local) are excluded from -csh. When I specifically exclude .. from the arguments using -csh I get the output I expect. This feels like a bug to me. I would expect all directories to be listed every time.

# du -csh .* *
960K .
2.3G ..
20K .bash_history
4.0K .bash_hosts
4.0K .bash_logout
4.0K .bash_profile
4.0K .bashrc
4.0K .cshrc
4.0K .tcshrc
8.0K .vimrc
248K portfolio.tgz
4.0K Web Design Portfolio.comment
2.3G total

# du -sh .* *
960K .
2.3G ..
20K .bash_history
4.0K .bash_hosts
4.0K .bash_logout
4.0K .bash_profile
4.0K .bashrc
4.0K .cpan
4.0K .cshrc
12K .ssh
40K .subversion
4.0K .tcshrc
24K .vim
8.0K .vimrc
300K local
248K portfolio.tgz
272K Web Design Portfolio
4.0K Web Design Portfolio.comment

# du -csh .[^.]* *
20K .bash_history
4.0K .bash_hosts
4.0K .bash_logout
4.0K .bash_profile
4.0K .bashrc
4.0K .cpan
4.0K .cshrc
12K .ssh
40K .subversion
4.0K .tcshrc
24K .vim
8.0K .vimrc
300K local
248K portfolio.tgz
272K Web Design Portfolio
4.0K Web Design Portfolio.comment
956K total

Anonymous

 

Attached Files
file #1766:  dutest.sh added by None (584B - application/x-sh - du test script showing effect of changed argument order)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Tue 21 Dec 2004 07:25:47 AM UTCeggertStatusNone=>Fixed
  Open/ClosedOpen=>Closed
Wed 15 Sep 2004 04:16:11 PM UTCNoneAttached File-=>Added dutest.sh, #1670

Back to the top


Powered by Savane 3.1-cleanup1