W3cubDocs

/Nushell

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
record record
table table

Examples

Convert the size column to KB

>ls|format filesizeKBsize

Convert the apparent column to B

>du|format filesizeBapparent

Convert the size data to MB

>4Gb|format filesizeMB
4000.0MB

Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/format_filesize.html