How to check if the Linux disk space is full?

  

If you are unable to read and write to the disk during the Linux process, the application cannot be executed, the request can't respond, etc., most of the time, the Linux system disk space is full, then how can you know that the Linux disk space is full? How to solve it?

Df command linux system disk partition is a unit view the file system, you can add parameters to view the disk space information, the command format:

df -hl

Display format:

File system capacity is available. % used mount point

Filesystem Size Used Avail Use% Mounted on

/dev/hda2 45G 19G 24G 44% /

/dev/hda1 494M 19M 450M 4% /boot

/dev/hda6 4.9G 2.2G 2.5G 47% /home

/dev/hda5 9.7G 2.9G 6.4G 31% /opt

none 1009M 0 1009M 0% /dev/shm

/dev/hda3 9.7G 7.2G 2.1G 78% /usr/local

/dev/hdb2 75G 75G 0 100% /

/dev/hdb2 75G 75G 0 100% /

Take the above output as an example, which means:

The second hard disk of the HD hard disk interface (b), the second partition (2), the capacity is 75G, the use of 75G, the available is 0, so the utilization is 100%, is mounted to the root partition directory on(/).

The following is an explanation of the relevant commands:

df -hl View the remaining space of the disk

df -h View the partition size of each root path

du -sh [directory name] Returns the size of this directory

du -sm [folder] Returns the total number of Ms in this folder

More functions can be found by typing:

df --help

du --help

View the partition of the hard disk #sudo fdisk -l

View the IDE hard disk information #sudo hdparm -i /dev/hda

View STAT hard drive information #sudo hdparm -I /dev/sda or #sudo apt-get install blktool #sudo blktool /dev/sda id

View hard drive free space #df -h # Df -H

View directory footprint #du -hs Directory name

USB flash drive cannot be uninstalled #sync fuser -km /media/usbdisk

The above is the Linux view disk space The method of fullness is introduced. If the Linux disk space is full, it will cause various problems and affect the use of the system. It should be cleaned up as soon as possible.

Copyright © Windows knowledge All Rights Reserved