Skip to content

Add option to set fixed output format for size or at least raw bytes #44

@MurzNN

Description

@MurzNN

Sometimes very useful to see all size values in same measurement, for example in megabytes.
Also for parsing output in scripts will be good to have a raw bytes output for all sizes.
For example, in btrfs filesystem df we can choose format via cli arguments:

# btrfs filesystem df --help
usage: btrfs filesystem df [options] <path>

    Show space usage information for a mount point

    -b|--raw           raw numbers in bytes
    -h|--human-readable
                       human friendly numbers, base 1024 (default)
    -H                 human friendly numbers, base 1000
    --iec              use 1024 as a base (KiB, MiB, GiB, TiB)
    --si               use 1000 as a base (kB, MB, GB, TB)
    -k|--kbytes        show sizes in KiB, or kB with --si
    -m|--mbytes        show sizes in MiB, or MB with --si
    -g|--gbytes        show sizes in GiB, or GB with --si
    -t|--tbytes        show sizes in TiB, or TB with --si

Can you please add this feature? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions