Home >Operation and Maintenance >CentOS >How to check centos hard disk capacity
The following column centos tutorial will introduce to you the method of checking the centos hard disk capacity. I hope it will be helpful to friends in need!
查看磁盘使用情况
df -h
列出指定的外围设备的[分区表]状况
fdisk -l
列出所有可用块设备的信息
lsblk
#sda1-->意思是第一个硬盘(a)的第一个分区(1)
列出所有设备的[分区]信息
parted -l
Command to check the space occupied by each directory and try to find the directory that takes up more space
du / -h --max-depth=1
Check the disk usage of Docker
docker system df
View image
docker images
Delete container
docker rm -f [containerID]
Deletion is useless Mirror
docker rmi 【镜像id】
Find the file to delete through the find command:
find /data/test/ -name "*.zip" -exec rm -rf {} \;
The above is the detailed content of How to check centos hard disk capacity. For more information, please follow other related articles on the PHP Chinese website!