Home > Operation and Maintenance > CentOS > How to check centos hard disk capacity

How to check centos hard disk capacity

藏色散人
Release: 2020-09-10 09:54:09
forward
10010 people have browsed it

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!

How to check centos hard disk capacity

查看磁盘使用情况
Copy after login
df -h
Copy after login


列出指定的外围设备的[分区表]状况
Copy after login
fdisk -l
Copy after login

 

列出所有可用块设备的信息
Copy after login
lsblk
Copy after login
#sda1-->意思是第一个硬盘(a)的第一个分区(1)
Copy after login

 

列出所有设备的[分区]信息
Copy after login
parted -l
Copy after login

 

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
Copy after login

 

Check the disk usage of Docker

docker system df
Copy after login


View image

 docker images
Copy after login

 

Delete container

docker rm -f [containerID]
Copy after login

Deletion is useless Mirror

docker rmi 【镜像id】
Copy after login

Find the file to delete through the find command:

find /data/test/ -name  "*.zip" -exec rm -rf {} \;
Copy after login

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!

Related labels:
source:cnblogs.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template