first : Overall situation of Unified Disk , Include disk size , Used , available

1. View current directory

df -h
result :

Unify the overall situation of disks in each directory

2. View the specified directory

Put the directory name directly after the command , For example, check “usr” Directory usage :
df -h /usr/
result :

Unified the usage of specified directory I , And the maximum space allocated

second : Check the usage of folders .

1. View the status of each folder in the current directory .

command :
du --max-depth=1 -h
give the result as follows :

The last line counts the total number of disks occupied

2. Specify directory

As long as the root directory name is directly after the command , In table of contents “/usr” take as an example
The command is as follows :
du --max-depth=1 -h /usr/
give the result as follows :

third : Calculate folder size

For quick display , At the same time, I just want to see the overall occupation size of the directory . Can be used directly du -sh command , If you want to view the specified directory , Directly in the root directory after the command .
command :
du -sh /usr/
give the result as follows :

fourth : summary

among df -h and du -sh More used , One statistics of the overall disk situation , A look at the use of individual directory points , And command du --max-depth=1 -h
Checked the usage of folders in the directory , Less use , It can be used du -sh replace , And the command is long , Of course, it's not that it's useless .

©2019-2020 Toolsou All rights reserved,
TP6 Application examples of verifier and correct verification data Unity Scene loading asynchronously ( Implementation of loading interface ) Gude Haowen serial - You deserve to be an engineer ( Preface ) Bitcoin in ten years ,VDS Opportunity or fraud Huawei certification HCIA-AI artificial intelligence Image explanation of over fitting and under fitting Python Basic knowledge and notes ESP8266/ESP32 System : Optimize system startup time First knowledge python Skills summary use C++ I want to talk to you “ Prototype mode ” ( copy / copy constructor )