Linux View available disk space df and du command .
df Viewing file systems by partition , How much space is occupied by the hard disk , Information such as how much space is left at present .
for example , We use df -h Command to view disk information , -h The option is to display appropriately according to the size ：
Display content parameter description ：
* Filesystem： file system
* Size： Partition size
* Used： Used capacity
* Avail： Usable capacity
* Use%： Percentage used
* Mounted on： Mount point
Related commands ：
* df -hl： View disk free space
* df -h： View partition size for each root path
* du -sh [ Directory name ]： Returns the size of the directory
* du -sm [ folder ]： Return to this folder total M number
* du -h [ Directory name ]： View all file sizes under the specified folder （ Include subfolders ）
du The original meaning of is disk usage, Indicates the disk space usage , Used to view the total size of the current directory .
For example, to view the size of the current directory ：
Displays the space occupied by the specified file ：
Easy to read format display test Space occupied by directory ：
# du -h test 608K test/test6 308K test/test4 4.0K test/scf/lib 4.0K
test/scf/service/deploy/product 4.0K test/scf/service/deploy/info 12K
test/scf/service/deploy 16K test/scf/service 4.0K test/scf/doc 4.0K
test/scf/bin 32K test/scf 8.0K test/test3 1.3M test
du Command to view the total size of the current directory ：
* -s： For each Names Parameter only gives the total number of data blocks occupied .
-a： Recursively display the number of data blocks occupied by each file in the specified directory and each file in the subdirectory . If neither is specified -s, Also do not specify -a, Show only Names The number of disk blocks occupied by each directory and its subdirectories in the .
* -b： List disk space usage in bytes （ The system defaults to k In bytes ）.
* -k： with 1024 List disk space usage in bytes .
* -c： Add a total at the end （ System default settings ）.
* -l： Calculate all file sizes , For hard linked files , Then calculate multiple times .
* -x： Skipped directories on different file systems are not counted .
* -h： with K,M,G Unit , Improve readability of information .