Miguel Barão wrote:
> This not a bug but rather an inconsistent output between these two du 
> options, 
> which is not documented in the manpages.
> 
> Suppose 'somefile' is a file containing a lot of zeros.
> 
> Then I get:
> $ du -k somefile
> 12
> $ du somefile
> 12
> $ du -b somefile
> 4194432
> 
> It seems that du -b is returning the size of the file, and not the "disk 
> usage" of that file.

Yes, as that is what is usually required.
This is documented at least since 5.2.1 in the man page (--help output)

du -b ≡ du --apparent-size --block-size=1

you want to use

du --block-size=1

Pádraig.


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to