Spec-Zone.ru › Nushell

into filesize for conversions

Convert value to a filesize.

Signature

> into filesize {flags} ...rest

Parameters

  • ...rest: For a data structure input, convert data at the given cell paths.

Input/output types:

input output
int filesize
number filesize
string filesize
filesize filesize
table table
record record
list<int> list<filesize>
list<number> list<filesize>
list<string> list<filesize>
list<filesize> list<filesize>
list<any> list<filesize>

Examples

Convert string to filesize in table.

> [[device size]; ["/dev/sda1" "200"] ["/dev/loop0" "50"]] | into filesize size
╭───┬────────────┬───────╮
│ # │   device   │ size  │
├───┼────────────┼───────┤
│ 0 │ /dev/sda1  │ 200 B │
│ 1 │ /dev/loop0 │  50 B │
╰───┴────────────┴───────╯

Convert string to filesize.

> '2' | into filesize
2 B

Convert float to filesize.

> 8.3 | into filesize
8 B

Convert int to filesize.

> 5 | into filesize
5 B

Convert file size to filesize.

> 4KB | into filesize
4.0 kB

Convert string with unit to filesize.

> '-1KB' | into filesize
-1.0 kB

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

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API