DF (disk free): Lists the overall disk usage of the file system
Usage:
DF [-AKMHI] [directory or file name]
Parameters:
-A: List all file systems, including system-specific/proc and other file systems
-K: Displays the file system in KB capacity;
-M: Displays the file system in MB capacity;
-H: In the people easier to read GB, MB, KB and other formats to display their own;
-I: Do not use the hard disk capacity, but the number of inode to display.
Common usage:
1. df-h//List all file systems in the system and display the results in a more readable format
Detailed output information:
1. Filesystem: Indicates which partition the file system is on, so list the device name
2. Size: Total sizes of partitions
3. Used: As the name implies, is the use of hard disk space.
4. Avaiable: That's the amount of disk space left
5. Use%: Is the disk usage rate.
6. Mounted on: Is the directory where the disk is mounted (mount point)
It is also important to note that if you use the-a parameter, the system will appear/proc this mount point, but everything inside is 0, do not tense. /proc are all the system data that Linux systems need to load and are mounted in memory, so of course there is no disk space.
2. The available disk capacity below/etc is displayed in an easy-to-read capacity format
Note In this example, when you add a directory or a file to the DF, DF automatically analyzes the partition where the directory or file resides and displays the capacity of that partition.
Note that the capacity of the disk partition on which the directory resides is displayed, not the directory itself.
Du (disk usage): Evaluate the disk usage of the file system (commonly used to estimate the capacity of the catalog)
Usage:
Du [-ahskm] file or directory name
Parameters:
-A: Lists all files and directory capacity, because the default is only the amount of files under the statistics directory;
-H: Displayed in a volume format (g/m) that is easier for people to read;
-S: Lists the total, not the capacity of each other directory;
-K: Displays the capacity in kilobytes;
-M: Displays the capacity in megabytes
Common usage:
1. du//List all file sizes in the current directory
2. Du-sh//List only the total capacity occupied by the current directory
Reference documents:
1. "Brother Bird's Linux private dish" basic Study (third edition) People's Post and telecommunications publishing house P210
"Linux Commands and Tools" disk-to-directory capacity--df and Du