Convert Numbers With numfmt
Turn byte counts into 1G/1M form, or parse human units back to raw numbers.
Run numfmt --to=iec 1073741824 to print 1.0G.
01Command
Command
$ numfmt --to=iec 107374182402What it does
numfmt is a coreutils helper for converting between plain numbers and SI or IEC units. Use --to=iec for binary units such as 1.0G, --from=si to parse a value like 1M, and combine it with awk in pipelines to make size columns readable.
03Risk
!Warning: SI (powers of 1000) and IEC (powers of 1024) differ; pick the one that matches the tool producing your numbers.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- GNU coreutils: numfmtEvidence: Documents numfmt, which reformats numbers to or from human-readable units.
- Debian package: coreutilsEvidence: Debian packages the GNU coreutils suite, which provides this command.
Last verified: 2026-09-20 · Category: Developer
06Related solutions
Update and upgrade packages on Debian/Ubuntu with apt
Refresh the package index from all configured repositories, then install newer versions of every upgradable package.
Search text recursively in a directory with grep
Find every occurrence of a pattern across all files in a tree, printed as file:line:number matches.
Extract a .tar.gz archive with tar
Unpack a gzipped tarball into the current directory while printing each file as it is extracted.