format filesize for strings
Converts a column of filesizes to some specified format.
Signature
> format filesize {flags} (format value) ...rest
Parameters
-
format value: The format into which convert the file sizes. -
...rest: For a data structure input, format filesizes at the given cell paths.
Input/output types:
| input | output |
|---|---|
| filesize | string |
| table | table |
| record | record |
Examples
Convert the size column to KB.
> ls | format filesize kB size
Convert the apparent column to B.
> du | format filesize B apparent
Convert the size data to MB.
> 4GB | format filesize MB 4000 MB
Notes
Decimal precision is controlled by $env.config.float_precision.
Copyright © 2019–2026 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/format_filesize.html