Home >Computer Tutorials >Computer Knowledge >Query the disk space usage of CentOS system
Use the df -h command to view the total capacity and used capacity of each file system. Your output shows that /dev/mapper/centos-root takes up 47% of the space, which is 36G.
Use the du -h -x –max-depth=1 / command to view the size of each subdirectory under the root directory. You can find out the directories that take up a lot of space based on the output, such as /var, /home, /usr, etc.
You can check the size of each subdirectory under the /var directory by running the command du -h -x --max-depth=1 /var. Continue this process until you find a file or directory that takes up more space.
https://blog.csdn.net/sch_wzq/article/details/105988036
The above is the detailed content of Query the disk space usage of CentOS system. For more information, please follow other related articles on the PHP Chinese website!