Linux disk management command-DF

Source: Internet
Author: User
From: http://fanqiang.chinaunix.net/a1/b1/20010508/133026.html

Function: Checks disk space usage of the file system. You can use this command to obtain the space occupied by the hard disk and the remaining space.

Syntax: DF [Option]

Note: The DF command displays the I node and disk block usage of all file systems.

The meaning of each option of this command is as follows:

-A: displays the disk usage of all file systems, including 0 block file systems, such as/proc file systems.

-K is displayed in K bytes.

-I: displays the I node information instead of the disk block.

-T: displays the disk space usage of each specified type of file system.

-X lists the disk space usage of a file system of a specified type (opposite to the T option ).

-T displays the file system type.

Example 1: List the disk space usage of each file system.

$ DF

Filesystem 1 K-blocks used available use % mounted on

/Dev/hda2 1361587 1246406 44823 97%/

Column 1st of the output list of the DF command represents the path name of the device file corresponding to the file system (usually the partition on the hard disk); Column 2nd shows the data block contained in the partition (1024 bytes) number; column 3 and 4 indicate the number of used and available data blocks, respectively. The user may be surprised that the sum of the blocks in column 3 and 4 is not equal to the number of blocks in column 3. This is because by default, each partition leaves a small amount of space for the system administrator to use. Even if the common user space is full, the administrator can still log on and leave the workspace required to solve the problem. The use % column in the list indicates the percentage of space used by normal users. That is, the number reaches 100%, and the partition still has space for the system administrator. Finally, the mounted on column indicates the Installation Point of the file system.

Example 2: List the I node usage of each file system.

$ DF-ia

Filesystem inodes iused ifree iused % mounted on

/Dev/hda2 352256 75043 277213 21%/

None 0 0 0%/proc

Localhost :( pid221) 0 0 0 0%/Net

Example 3: list the types of file systems.

$ DF-T

Filesystem type 1k-blocks used available use % mounted on

/Dev/hda2 ext2 1361587 1246405 44824 97%/

In this example, the file system is of the ext2 type.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.