DF is commonly used to view disk usage.
Du is commonly used to view the size of a folder.
Linux commands:
DF [-ahikhtm] [directory or folder]
Parameters:
-H: Display the usage of 1111000KB-XXXMB in a way that is easier to recognize, by default in KB
-I: Do not use disk capacity, with the number of inode to display
-A: List all file systems, including system-specific/proc and other file systems
-K: Display the file system in KB capacity (default)
-M: Display file system in MB capacity
-H: Substituting 1000 for 1024 in binary mode
-T: Along with the file system name of the partition (EXT3), etc. also listed
Example:
Df
Df-h
Df-ah
df-h [Dirname|filename]
===============================================
Du [-ahskm] file or directory name
-S: Lists the total, not each individual directory occupancy capacity!!!!
-H: Display in an easy-to-read manner (g/m)
-A: Lists all files and directory capacity, by default only the amount of files in the statistics directory
-S: does not include totals under the directory, and is different from-s
-K: List capacity Display in KB
-M: Displays the capacity in megabytes
Example:
List files in the current directory in kilobytes | Folder occupancy size
Du-s./*
List size in person-aware way
Du-sh./*
Sort by KB final display of top 5, measured in KB units
Other:
Linux DF view hard disk usage du view file size