Minor problem with du output in beta 17.1

Jim Balter jqb@netcom.com
Fri Apr 4 16:05:00 GMT 1997

Ian Macpherson wrote:

> I believe the output of the gnuish 'du' to be correct. Compared to this the
> gnu-win32 'du' misses sub-directories and seems to be reporting 2K blocks
> (even if -k is used).

du under gnu-win32 is known to report in multiples of 2048 rather than
1024 because stat returns the wrong value for st_blocks; try du -b or
du -h instead (-k is the default unless POSIXLY_CORRECT is set in the
environment).  It is also known to ignore some files or directories
altogether because it uses inode numbers to check for loops but stat
returns non-unique inode numbers.  You could patch the du source
to not look for loops.

> As a general point, I find the gnu-win32 utilities very slow when comapred
> to the gnuish DOS equivalents, particularly programs that traverse directories.
> Is there a reason for this?

gnu-win32 stat opens every file to try to see if it is a symlink
or executable.  Maybe it will come to its senses in b18.

<J Q B>
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

More information about the Cygwin mailing list