du bug, wrong sizes reported.
Bruce N. Hunsaker
Tue Jan 20 15:29:00 GMT 1998
I have searched the archives but haven't seen this one
reported yet (but I might have missed it).
du reports sizes in 2k blocks. It should report sizes using
a block size of 1k.
$ ls -l du.exe
-rwxr-x-r-x 1 all Everyone 22016 May 08 1997 du.exe
$ du du.exe
The correct output of du should be:
Looking at the source I changed 2 lines of code to fix this problem.
Change the line that says:
size =(stat_buf.st_size + 511) / 512;
I wonder what's wrong the the ST_NBLOCKS macro?
convert_blocks( size, output_size == kilobytes)
convert_blocks( size, output_size)
This looks like a bug in the code, and might be fixed if there is a
newer version of GNU fileutils.
Also, performance is quite bad. It is better with the patched
cygwin.dll in coolview, but du should still be much faster. (See
similar problems with find and ls...)
Bruce Hunsaker - email@example.com
For help on using this list (especially unsubscribing), send a message to
"firstname.lastname@example.org" with one line of text: "help".
More information about the Cygwin