Skip to content

df: no rounding with -H flag #8690

@bakanovskii

Description

@bakanovskii
# gnu
$ df -i
Filesystem       Inodes   IUsed    IFree IUse% Mounted on
tmpfs            819200    1499   817701    1% /run

# gnu
$ df -hi
Filesystem     Inodes IUsed IFree IUse% Mounted on
tmpfs            800K  1.5K  799K    1% /run

# gnu
$ df -Hi
Filesystem     Inodes IUsed IFree IUse% Mounted on
tmpfs            820k  1.5k  818k    1% /run

# uutils (first two are OK)
$ cargo run  --all-features -- df -Hi
Filesystem     Inodes IUsed IFree IUse% Mounted on
tmpfs            819.2k  1.5k  818k    1% /run

coreutils rounds 819.2K to 820K

also relates to: #8683

should it remain fully backwards compatible or we can leave it as is? I'll open a PR if it is considered wrong

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions