delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/02/06/08:09:29

From: jqb AT netcom DOT com (Jim Balter)
Subject: Re: du does not find all directories
6 Feb 1997 08:09:29 -0800 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <32F9E9DA.3398.cygnus.gnu-win32@netcom.com>
References: <32F97664 DOT 7D84 AT aps DOT anl DOT gov>
Mime-Version: 1.0
X-Mailer: Mozilla 3.01Gold (WinNT; I)
Original-To: "Kenneth Evans, Jr." <evans AT aps DOT anl DOT gov>
Original-CC: gnu-win32 AT cygnus DOT com
Original-Sender: owner-gnu-win32 AT cygnus DOT com

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
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019