Unexpected side effect of -b option in du

Mirko Vogt busybox at nanl.de
Mon Sep 26 12:31:33 UTC 2022


On 26.09.22 13:53, Evin Yulo wrote:
> The -b option to busybox's du seems to have an unexpected side effect of changing the default unit from kilobytes to bytes. Is this intended? If so, why?

What did you expect "du -b [PATH]" doing, except exactly that?
I know GNU compatibility is not a must-criteria for busybox, but for 
GNU's "du" that's exactly what "-b" is supposed to do (as documented) - 
hence, if "-b" is available for busybox's "du", behaving the same is the 
closest I'd expect(?)

> Also, the option is not listed in the syntax synopsis, `Usage: du [-aHLdclsxhmk] [FILE]...`, in --help output.

"-b" seems to be missing from the docs indeed

   mirko


More information about the busybox mailing list