Subject: Re: du does not find all directories
From: [email-masked] (Ken Evans)

6 Feb 1997 16:49:27 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Original-To: [email-masked]
Original-CC: [email-masked], [email-masked]
In-reply-to: <[email-masked]> (message from Jim Balter on Thu, 06
	Feb 1997 06: 25:30 -0800)
Original-Sender: [email-masked]

"JB" == Jim Balter <[email-masked]> writes:

 JB> Kenneth Evans, Jr. wrote:
 >>  I just downloaded the latest version of gnu-win32 via all.tar.gz.
 >> I find that du finds 335637 (presumably times 512) Bytes on my
 >> hard

 JB> No, it defaults to kilobytes.

 >> drive.  There are, in fact, close to 2 GBytes (why I am using it).
 >> It misses a number of directories including c:\windows.  I am
 >> running Win95.  I don't know how to find out the version of
 >> gnu-win32, but I downloaded it today.  It is pretty reproducible
 >> (for me).  It gets exactly the same number each time, even though
 >> I have been deleting files (apparently in directories it is
 >> missing).

 JB> du uses inode numbers to detect links, so it will only count a
 JB> file once.  The cygwin implementation of inode numbers is bogus.
 JB> You might want to build a version of du.c with the inode hashing
 JB> commented out.  Also, the implementation of ST_NBLOCKS is wrong.
 JB> You can better results from du by using the -b flag for bytes or
 JB> the -h flag for "human readable".

 JB> -- <J Q B>

Jim,

     Thanks for the quick reply.  I was using the man pages from my
Sun workstation.  If they are kilobytes, then I get
335637*1024=343,692,288 bytes on a 2 GB drive which is nearly full.
Moreover it is missing many directories, such as c:\windows and
c:\netscape.  There are others.  I haven't systematically checked.  I
have few links (Win95 "shortcuts", I assume) that I know about.  If I
do:

du c:\netscape

it does c:\netscape all right, even though it misses it with:

du / (or du c:\, or other apparent equivalents).

     The behavior is consistent with its running out of resources and
quitting without saying so.  I can't tell as I don't know the search
order.  There were 50 MB free when I started, and I have run it with
150 MB free space and get the same, consistent results, so I don't
think it is because of the shortage of space on the drive.  It is my
only hard drive, but there was a CD-ROM in the CD drive.  There is no
indication it was reading anything but the C drive, however.  Both
Explorer and Scandisk agree on the number of free bytes, and I
definitely have more than 350 MB.

     The PC I am using is at home.  I will try your suggestions when I
get home.  I am not sufficiently up to speed to do a build, however.
Thanks again.

	-Ken

-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".