Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions pages/common/numfmt.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@

`numfmt --from si 1.5K`

- Convert 1500 to 1.5K (SI Units):

`numfmt --to si 1500`

- Convert 1.5K (IEC Units) to 1536:

`numfmt --from iec 1.5K`

- Use appropriate conversion based on the suffix:

`numfmt --from auto {{1.5Ki}}`

- Convert 5th field (1-indexed) to IEC Units without converting header:

`ls -l | numfmt --header=1 --field 5 --to iec`
Expand Down
Loading