What is the command to check the disk size in Linux?
In Linux, you can use the df command to check the disk size. The complete format of the df command is as follows:
df [options] [file or directory]
Common options include:
- h: Display the disk size in a human-readable format.
- – Display all file systems, including system reserved file systems.
- Display information about inode usage.
- “T: Display the file system type.”
For example, to check the total disk size of the entire system, you can simply run the df command.
I just need one option: df, paraphrase this natively in English.
To display disk size in a human-readable format, use the -h option.
Show the disk space usage in a human-readable format.
If you only want to check the disk size of a specific file or directory, you can add the path of the file or directory after df, for example:
Check the disk size of the /home directory.