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 sizeConvert the apparent column to B.
> du | format filesize B apparentConvert the size data to MB.
> 4GB | format filesize MB
4000 MBNotes
Decimal precision is controlled by $env.config.float_precision.