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