Linux disk query instruction

Disk situation inquiry:

Query system overall disk usage:

df -h

 

 Specified directory of the disk occupancy

du -h / directory

Specified directory disk usage, the default is the current directory

-s size specified directory occupancy Summary

-h with units of measurement

-a file containing

--max-depth = 1 Depth subdirectory

-c increase aggregate values ​​listed in detail at the same time

Applications:

Query / opt directory disk consumption, a depth of 1

 

 Disk case - work and practical instruction

Number 1) statistics / home folder files

Number 2) statistics / home directory folder

3) statistics / home folder under the file number, including subfolders inside

 

 Note must be capitalized R

4) count the number of directory folders, including subfolders inside

5) displays the directory structure in a tree

 

 If you do not find the command prompt, then you can use yum install tree to install

Guess you like

Origin www.cnblogs.com/wanghaoyu666/p/11793313.html