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:

inputoutput
filesizestring
recordrecord
tabletable

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.0 MB