Heinrich Schuchardt | 41e2424 | 2021-05-15 13:08:57 +0200 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | |
Heinrich Schuchardt | 1b0c316 | 2024-01-14 14:53:13 +0100 | [diff] [blame] | 3 | .. index:: |
| 4 | single: size (command) |
| 5 | |
Heinrich Schuchardt | 41e2424 | 2021-05-15 13:08:57 +0200 | [diff] [blame] | 6 | size command |
| 7 | ============ |
| 8 | |
| 9 | Synopsis |
| 10 | -------- |
| 11 | |
| 12 | :: |
| 13 | |
| 14 | size <interface> <dev[:part]> <filename> |
| 15 | |
| 16 | Description |
| 17 | ----------- |
| 18 | |
| 19 | The size command determines the size of a file and sets the environment variable |
| 20 | filesize to this value. If filename points to a directory, the value is set to |
| 21 | zero. |
| 22 | |
| 23 | If the command fails, the filesize environment variable is not changed. |
| 24 | |
| 25 | dev |
| 26 | device number |
| 27 | |
| 28 | part |
| 29 | partition number, defaults to 1 |
| 30 | |
| 31 | filename |
| 32 | path to file |
| 33 | |
| 34 | Configuration |
| 35 | ------------- |
| 36 | |
| 37 | The size command is only available if CONFIG_CMD_FS_GENERIC=y. |
| 38 | |
| 39 | Return value |
| 40 | ------------ |
| 41 | |
| 42 | The return value $? is set to 0 (true) if the command succeded and to 1 (false) |
| 43 | otherwise. |