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]$ 


___________________________ Forwarded message ----------------------

Reply-To: [EMAIL PROTECTED]
Sender: [EMAIL PROTECTED]
Message-Id: <[EMAIL PROTECTED]>
Date: Sat, 07 Jun 1997 20:11:48 -0400
From: "Daniel S. Barclay" <[EMAIL PROTECTED]>
X-Mailer: Mozilla 3.01Gold (X11; U; Linux 2.0.27 i486)
Mime-Version: 1.0
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: "du -sc ...xxx ...xxx/*" skips directories
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Package: fileutils
Version: 3.13-4

The du utility (/usr/bin/du) sometimes gets confused when it is given
overlapping arguments of the form "...xxx" and "...xxx/*", along with
the "-s" and "-s" flags.

I say sometimes because I thought I saw some cases in which du worked
correctly.  (However, I can't find any such cases at the moment.)

The symptom is that it prints results for the "...xxx" directory,
but prints nothing for the "...xxx/*" directories.  (It does print data
for "...xxx/*" _files_.)



Example 1 (breaks, with or without trailing slashes):

I have a directory with a number of subdirectories (and one file):

$ ls -la /home/daniel/explore/
total 30
drwxr-xr-x  15 daniel   users        1024 Apr 12 19:31 .
drwxr-xr-x  32 daniel   users        6144 Jun  7 19:00 ..
-rw-r--r--   1 root     root          336 Apr 19 19:49 .whatsit
-rwxr-xr-x   1 daniel   users       12916 Sep 10  1995 exp_atomic
drwxr-xr-x   2 daniel   users        1024 Feb  9 16:07 glob
drwxr-xr-x   2 daniel   users        1024 Mar  3  1996 hashing
drwxr-xr-x   7 daniel   users        1024 May 18 19:55 inet
drwxr-xr-x   2 daniel   users        1024 Feb  9 16:07 ipc
drwxr-xr-x   3 daniel   users        1024 Feb  9 16:07 jobcntl
drwxr-xr-x   2 daniel   users        1024 Feb  9 16:07 misc
drwxr-xr-x   2 daniel   users        1024 Feb  9 16:07 modem
drwxr-xr-x   3 daniel   users        1024 Apr 29 23:18 perl
drwxr-xr-x   2 daniel   users        1024 Feb  9 16:07 rawio
drwxr-xr-x   2 daniel   users        1024 Feb  9 16:07 shell
drwxr-xr-x   2 daniel   users        1024 Mar 18 12:50 shlib
drwxr-xr-x   3 daniel   users        1024 Feb  9 16:07 tape
drwxr-xr-x   2 daniel   users        1024 Feb  9 16:07 termcap
$

"du -sc" seems to work when given a single argument:

$ du -sc /home/daniel/explore
7198    /home/daniel/explore
7198    total
$

$ du -sc /home/daniel/explore/
7198    /home/daniel/explore
7198    total
$

$ du -sc /home/daniel/explore/*
9       /home/daniel/explore/exp_atomic
39      /home/daniel/explore/glob
6       /home/daniel/explore/hashing
1780    /home/daniel/explore/inet
643     /home/daniel/explore/ipc
246     /home/daniel/explore/jobcntl
3242    /home/daniel/explore/misc
17      /home/daniel/explore/modem
772     /home/daniel/explore/perl
39      /home/daniel/explore/rawio
7       /home/daniel/explore/shell
15      /home/daniel/explore/shlib
362     /home/daniel/explore/tape
19      /home/daniel/explore/termcap
7196    total
$


$ du -sc /home/daniel/explore/*/
39      /home/daniel/explore/glob
6       /home/daniel/explore/hashing
1780    /home/daniel/explore/inet
643     /home/daniel/explore/ipc
246     /home/daniel/explore/jobcntl
3242    /home/daniel/explore/misc
17      /home/daniel/explore/modem
772     /home/daniel/explore/perl
39      /home/daniel/explore/rawio
7       /home/daniel/explore/shell
15      /home/daniel/explore/shlib
362     /home/daniel/explore/tape
19      /home/daniel/explore/termcap
7187    total
$

However, combining those (overlapping) arguments confuses du:

$ du -s -c /home/daniel/explore /home/daniel/explore/*
7198    /home/daniel/explore
9       /home/daniel/explore/exp_atomic
7207    total
$

Specifically, it does not list the _directories_ specified by
"/home/daniel/explore/*")


I would guess that this is a design problem in the interaction of the
-s and -c options.  In any case, the "-c" option shouldn't cause
requested directories to be suppressed.



Daniel
--
Daniel S. Barclay
[EMAIL PROTECTED] / [EMAIL PROTECTED]

Reply via email to