This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: du does not find all directories


"JB" == Jim Balter <jqb@netcom.com> 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
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]