du
Command Function
This command is used to query the disk space occupied by a file.
Syntax
du [-kKmh] [file...]
Parameters
Table 1 Parameter description
Usage
- The du command is used to obtain the disk usage of a file rather than a directory.
- The value of file must be the file name. It cannot contain the directory where the file is located.
Example
Run du -h testfile.
Output
Command output
OHOS:/$ du -h testfile
1.8K testfile