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

6 Feb 1997 08:09:29 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.01Gold (WinNT; I)
Original-To: "Kenneth Evans, Jr." <[email-masked]>
Original-CC: [email-masked]
Original-Sender: [email-masked]

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

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).

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

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