DF: Lists the overall disk usage of the file system;
Du: Evaluating the disk usage of the file system (commonly used to estimate the capacity of the catalog)
DF parameter:
-A: List all file systems, including system-specific/proc and other file systems
-K: Displays each file system in KB capacity
-M: Display the file system in MB capacity
-H: Self-display in GB,MB,KB and other formats that are easier for people to read
-H: Replace m=1024k's carry mode with m=1000k
-T: Along with the file system name for the partition (for example, Ext3) is also listed
-I: Do not use the hard disk capacity, but the number of inode to display
Example:
① under Linux, if DF does not have any parameters, the default is to list all of the system (the file system without special memory and swap) in 1KB capacity.
Filesystem: Indicates which partition the file system is on, so list the device name
1k-blocks: Note that the following number unit is 1KB, can use- h or- m to change the capacity
Used: Unused hard disk space
Available: The remaining disk space size
use%: Disk usage
Mountedon: The directory where the disk is mounted (mount point)
② display of capacity results in an easy-to-read capacity format
③ all special file formats and names in the system are listed
④ the available disk capacity below/etc is displayed in a readable capacity format
⑤ Lists the number of inode numbers currently available in each partition
Du 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 more readable capacity format (g/m);
-S: lists the total, not each individual directory that occupies the capacity;
-S: does not include totals under subdirectories, and is somewhat different from-s;
-K : Displays the capacity in kilobytes;
-M : Displays the capacity in megabytes .
Example:
① List all file sizes in the current directory
② with example one, but also lists the file's capacity
③ check the capacity of each directory below the root directory
Unlike DF ,du will find all the file data directly in the file system.
Du-s Displays the total file size (without subdirectories) in the current directory, and du displays the total capacity (including subdirectories) for all files in that directory at the end.
View disk and directory capacity under Linux--df, du