Home>Article>Operation and Maintenance> How to check the disk space in centos7

How to check the disk space in centos7

Robert De Niro
Robert De Niro Original
2020-04-01 13:38:29 16088browse

How to check the disk space in centos7

Execute command:

df -hl

Display:

文件系统 容量 已用 可用 已用% 挂载点 Filesystem Size Used Avail Use% Mounted on /dev/hda2 45G 19G 24G 44% / /dev/hda1 494

Other disk related commands are as follows:

Check the remaining disk space

df -hl

View the partition size of each root path

df -h

Return the size of the directory

du -sh [目录名]

Return the total number of M in the folder

du -sm [文件夹]

View the specified folder All file sizes (including subfolders)

du -h [目录名]

View hard disk partitions

#sudo fdisk -l

View IDE hard disk information

#sudo hdparm -i /dev/hda

View STAT hard disk information

#sudo hdparm -I /dev/sda

or

#sudo apt-get install blktool #sudo blktool /dev/sda id

Check the remaining hard disk space

#df -h #df -H

Check the directory occupied space

#du -hs 目录名

Recommended related tutorials:centos tutorial

The above is the detailed content of How to check the disk space in centos7. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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