Here is the information about the Linux command df:
DF Command:
The function of the DF command in Linux is to check the disk space usage of the Linux server's file system. You can use this command to get information about how much space the hard disk is taking up, and how much space is left.
1. Command format:
DF [Options] [file]
2. Command function:
Displays the free space for the specified disk file. If no file name is specified, all available space for the currently mounted file system will be displayed. By default, disk space is displayed in 1KB, unless the environment variable posixly_correct is specified, which is displayed in 512-byte units.
3. Command parameters:
Necessary parameters:
-A All File system list
-h easy to read mode display
-H equals "-H", but the formula, 1k=1000, rather than 1k=1024
-I display inode information
-K block is 1024 bytes
-L show local file system only
-M block is 1048576 bytes
--no-sync Ignore sync command
-P output format POSIX
--sync perform the sync command before obtaining the disk information
-T File system type
Select parameters:
--block-size=< Chunk Size > specified chunk size
-t< file system type > show only disk information for selected file systems
-x< file System type > does not display disk information for the selected file system
--HELP Display Help information
--version displaying version information
The "df-h" command is a familiar one. Displays current disk space and usage in an easier-to-read manner.
"Df-i" displays disk usage in Inode mode.
What is the difference between df-h and df-i? Also shows disk usage, why is the percentage of display consumption far apart?
A good explanation for df-h is to see how much disk capacity is being used.
As for df-i, we need to understand the inode first.
To the blogger's personal understanding, the simplest argument is that the inode contains the information: the number of bytes of the file, the owner ID, the group ID, the permission, the change time, the number of links, the location of the data block. Instead, the file size is not represented. That's why Df-h and Df-i show a different result.
PS: in df-h and df-i display usage rate 100%, the basic solution is to delete files.
Df-h is to remove large useless files-----------large files occupy a large amount of disk capacity.
Df-i to delete too many small files-----------too many files occupy a large number of inode numbers.
Linux command (2): DF command