Check the hard disk usage.
To check the Linux hard disk information, use the "df command".
The df command is used to set the hard disk's
Used space
Free space
Percentage of usage
The df command displays the following information
In Linux, hard disks are treated as special files called device files.
IDE drives have the names /dev/hda (primary star hard disk), /dev/hdb (primary slave hard disk), etc. on Linux systems.
The results of the df command will also show the names of these files, so you can distinguish between them and check their usage even if you are using multiple hard disks.
Example of a device file
device file | Description. |
/dev/hda | HDD connected to the primary master |
/dev/hdb | HDD connected to the primary slave |
/dev/hdc | HDD connected to a secondary master |
/dev/hdd | HDD connected to the secondary slave |
/dev/sda | HDD connected to the first SCSI/SATA/USB |
/dev/sdb | HDD connected to the second SCSI/SATA/USB |
/dev/sdc | HDD connected to the third SCSI/SATA/USB |
/dev/sdd | HDD connected to the fourth SCSI/SATA/USB |
/dev/sr0 | 1st CD/DVD drive |
/dev/st0 | 1st tape driveブ |
●Check the hard disk usage.
[root@Lion ~]# df file system 1K-block Use Use Possible Use % Mount position /dev/mapper/centos_Lion-root 52403200 17551216 34851984 34% / devtmpfs 3904396 0 3904396 0% /dev tmpfs 3918112 0 3918112 0% /dev/shm tmpfs 3918112 385728 3532384 10% /run tmpfs 3918112 0 3918112 0% /sys/fs/cgroup[root@Lion ~]# df -h ←If the option "h" is specified, it will be displayed in MB or GB file system syze use remaining use% Mount position /dev/mapper/centos_Lion-root 50G 17G 34G 34% / devtmpfs 3.8G 0 3.8G 0% /dev tmpfs 3.8G 0 3.8G 0% /dev/shm tmpfs 3.8G 377M 3.4G 10% /run tmpfs 3.8G 0 3.8G 0% /sys/fs/cgroup |