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

How to check the disk space in centos7

王林
Release: 2020-04-01 13:38:29
Original
16284 people have browsed it

How to check the disk space in centos7

Execute command:

df -hl
Copy after login
Copy after login

Display:

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

Other disk related commands are as follows:

Check the remaining disk space

df -hl
Copy after login
Copy after login

View the partition size of each root path

df -h
Copy after login

Return the size of the directory

du -sh [目录名]
Copy after login

Return the total number of M in the folder

du -sm [文件夹]
Copy after login

View the specified folder All file sizes (including subfolders)

du -h [目录名]
Copy after login

View hard disk partitions

#sudo fdisk -l
Copy after login

View IDE hard disk information

#sudo hdparm -i /dev/hda
Copy after login

View STAT hard disk information

#sudo hdparm -I /dev/sda
Copy after login

or

#sudo apt-get install blktool
 #sudo blktool /dev/sda id
Copy after login

Check the remaining hard disk space

#df -h #df -H
Copy after login

Check the directory occupied space

#du -hs 目录名
Copy after login

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!

Related labels:
source:php.cn
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