-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
Description
For GNU coreutils, the order of arguments matters in du:
$ du -m -sb Base
23507402 Base
$ du -sb -m Base
23 Base-b means both --apparent-size and --block-size=1. If -b is before -m (--block-size=1M), the size is printed in megabytes.
uutils du ignores the order and always prints the size in bytes:
$ ~/repos/uutils-coreutils/target/debug/coreutils du -m -sb Base/
23507402 Base/
$ ~/repos/uutils-coreutils/target/debug/coreutils du -sb -m Base/
23507402 Base/SerenityOS currently needs a workaround for this (see SerenityOS/serenity#26120 and SerenityOS/serenity#26121).
We can't use --apparent-size everywhere since BusyBox only supports short arguments, so only -b, which is described as:
-b Apparent size (including holes)
For BusyBox this argument doesn't even mean --block-size=1.
Reactions are currently unavailable