NUMFMT(1)

πŸ“¦ version 0.12.0, in arch rolling

πŸ’– NUMFMT(1) β€” General Commands Manual πŸ’–

okay bestie, welcome to the General Commands Manual page for numfmt. She literally converts numbers from/to human-readable strings, and she's about to explain every single flag like it's her Roman Empire. let's go 🫢


✨ NAME ✨

numfmt β€” Convert numbers from/to human-readable strings


🌸 SYNOPSIS 🌸

numfmt [OPTION]... [NUMBER]...

πŸ¦‹ DESCRIPTION πŸ¦‹

Convert numbers from/to human-readable strings. that's the whole vibe, no cap. ✨


πŸ’… OPTIONS πŸ’…

  • --debug β€” print warnings about invalid input
  • --grouping β€” use locale-defined grouping of digits, for example 1,000,000 (which means it has no effect in the C/POSIX locale)
  • -d, --delimiter <X> β€” use X instead of whitespace for field delimiter
  • --field <FIELDS> [default: 1] β€” replace the numbers in these input fields; see FIELDS below
  • --format <FORMAT> β€” use printf style floating-point FORMAT; see FORMAT below for details
  • --from <UNIT> [default: none] β€” auto-scale input numbers to UNITs; see UNIT below
  • --from-unit <N> [default: 1] β€” specify the input unit size
  • --to <UNIT> [default: none] β€” auto-scale output numbers to UNITs; see UNIT below
  • --to-unit <N> [default: 1] β€” the output unit size
  • --padding <N> β€” pad the output to N characters; positive N will right-align; negative N will left-align; padding is ignored if the output is wider than N; the default is to automatically pad if a whitespace is found
  • --header[=<N>] β€” print (without converting) the first N header lines; N defaults to 1 if not specified
  • --round <METHOD> [default: from-zero] β€” use METHOD for rounding when scaling

Possible values:

  • up
  • down
  • from-zero
  • towards-zero
  • nearest
  • --suffix <SUFFIX> β€” print SUFFIX after each formatted number, and accept inputs optionally ending with SUFFIX
  • --unit-separator <STRING> β€” use STRING to separate the number from any unit when printing; by default, no separator is used
  • --invalid <INVALID> [default: abort] β€” set the failure mode for invalid input

Possible values:

  • abort
  • fail
  • warn
  • ignore
  • -z, --zero-terminated β€” line delimiter is NUL, not newline
  • -h, --help β€” Print help
  • -V, --version β€” Print version

πŸ”₯ EXTRA πŸ”₯

🌈 UNIT options β€” the unit lore 🌈

  • none β€” no auto-scaling is done; suffixes will trigger an error
  • auto β€” accept optional single/two letter suffix:
1K = 1000, 1Ki = 1024, 1M = 1000000, 1Mi = 1048576,
  • si β€” accept optional single letter suffix:
1K = 1000, 1M = 1000000, ...
  • iec β€” accept optional single letter suffix:
1K = 1024, 1M = 1048576, ...
  • iec-i β€” accept optional two-letter suffix:
1Ki = 1024, 1Mi = 1048576, ...

βœ‚οΈ FIELDS β€” cut(1) style, fr fr βœ‚οΈ

FIELDS supports cut(1) style field ranges:

N N'th field, counted from 1
N- from N'th field, to end of line
N-M from N'th to M'th field (inclusive)
-M from first to M'th field (inclusive)
- all fields

Multiple fields/ranges can be separated with commas.

πŸŽ€ FORMAT β€” the printf-ish details πŸŽ€

FORMAT must be suitable for printing one floating-point argument %f. Optional quote (%'f) will enable --grouping (if supported by current locale). Optional width value (%10f) will pad output. Optional zero (%010f) width will zero pad the number. Optional negative values (%-10f) will left align. Optional precision (%.1f) will override the input determined precision.


🌟 VERSION 🌟

v(uutils coreutils) 0.12.0

xoxo, your numfmt bestie πŸ’… β€” this was the General Commands Manual page for NUMFMT(1), from v(uutils coreutils) 0.12.0, dated 2026-09-17. periodt πŸŽ€

πŸ“¦ where this page comes from