public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Minor problem with du output in beta 17.1
@ 1997-04-04 10:40 Ian Macpherson
  1997-04-04 16:05 ` Jim Balter
  0 siblings, 1 reply; 2+ messages in thread
From: Ian Macpherson @ 1997-04-04 10:40 UTC (permalink / raw)
  To: gnu-win32

I've just downloaded the gnu-win32 beta 17.1 utilities and have noticed
a problem with the output of the 'du' command. On my Windows95 PC running
'du cygnus' generates the following output:

236	cygnus/man/man1
3	cygnus/man/man5
15	cygnus/man/man3
254	cygnus/man
0	cygnus/var
3316	cygnus/H-i386-cygwin32/bin
237	cygnus/H-i386-cygwin32/libexec/awk
618	cygnus/H-i386-cygwin32/libexec
0	cygnus/H-i386-cygwin32/lib
1	cygnus/H-i386-cygwin32/etc
3934	cygnus/H-i386-cygwin32
0	cygnus/share
4223	cygnus

Compare this to running the gnuish DOS du command (V3.12):

448	cygnus/man/man1
5	cygnus/man/man5
30	cygnus/man/man3
482	cygnus/man
0	cygnus/var
6601	cygnus/h-i386~1/bin
474	cygnus/h-i386~1/libexec/awk
1234	cygnus/h-i386~1/libexec
0	cygnus/h-i386~1/lib
1	cygnus/h-i386~1/etc
7836	cygnus/h-i386~1
16	cygnus/share/awk
16	cygnus/share
0	cygnus/lib
8404	cygnus

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

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?

Ian.

+-----------------------------------------------------------------------+
|Ian Macpherson								|
|3Com Ltd.			Phone:	+44 (1442) 438326		|
|3Com Centre,			Fax:	+44 (1442) 438333		|
|Boundary Way,			Email:	ianm@pdd.3com.com		|
|Hemel Hempstead,							|
|Herts. HP2 7YU.							|
|United Kingdom.							|
+-----------------------------------------------------------------------+
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Minor problem with du output in beta 17.1
  1997-04-04 10:40 Minor problem with du output in beta 17.1 Ian Macpherson
@ 1997-04-04 16:05 ` Jim Balter
  0 siblings, 0 replies; 2+ messages in thread
From: Jim Balter @ 1997-04-04 16:05 UTC (permalink / raw)
  To: Ian Macpherson; +Cc: gnu-win32

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1997-04-04 16:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-04-04 10:40 Minor problem with du output in beta 17.1 Ian Macpherson
1997-04-04 16:05 ` Jim Balter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).