du reports half of correct file sizes

Ross Boulet ross@rossb.com
Sun Dec 26 04:42:00 GMT 2004


> Ross Boulet wrote:
> > 
> > I saw some old items in the archives (circa 2001) but
there
> > was not much there about this problem.  The most recent
> > version of coreutils seems to have broken du.  The
listing
> > below illustrates my point:
> 
> If you have POSIXLY_CORRECT set in your environment then
the default
> block size for du is 512 bytes, which is what the posix
standard
> requires.  Use -b or -k if you want bytes or kbytes,
respectively.
> 
> Brian
> 
>

I do not have POSIXLY_CORRECT set.  I tried the -b and -k
options.  The -b option reports correctly, but the -k still
seems to report half.

$ ls -l a*
-rw-r--r--  1 rossboulet None    2 Dec 25 17:24 a
-rw-r--r--  1 rossboulet None 3740 Dec 25 10:58 aaa

$ du -b a*
2       a
3740    aaa

$ du -k a*
1       a
2       aaa



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list