Skip to content

--human-readable shows SI prefixes even without --si #341

Description

@HybridDog

If there is a file of size 2887069 B in the folder, LC_ALL=C ls -l --all --human-readable shows 2.8M as the size and LC_ALL=C ls -l --all --human-readable --si shows 2.9M.
M is an SI-prefix which means factor 1000^2 but ls uses it for factor 1024^2, too, where Mi would be the official prefix; see for example https://en.wikipedia.org/wiki/Byte#Multiple-byte_units and https://physics.nist.gov/cuu/Units/binary.html.

I think the output with --human-readable should be changed such that it shows the standardised prefixes and the unit, e.g. without --si MiB instead of M and with --si MB instead of M.
Since --human-readable is meant for humans and not parsers, there should be no backwards-compatibility problem if the output format is changed.

(my coreutils version: 9.11-2)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions