Linux View disk mount partition usage DF detailed __linux

Source: Internet
Author: User
Tags disk usage
Linux view disk mounted partition usage DF detailed
2010-12-12 20:23:48 Source: Network Comment: 0 click: 417
The df command parameter function in Linux: Check the file system for disk space consumption. You can use this command to get how much space the hard disk is occupied and how much space is left.

Syntax: DF [Options]

Description: The DF command in Linux shows the use of the I node and disk block by all file systems.

The various options for this command have the following meanings:

-a displays disk usage for all file systems, including 0 block file systems, such as the/proc file system.

-K is displayed in K-byte units.

-I displays the I-node information, not the disk block.

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

-x Lists disk space usage (contrary to the T option) that is not a file system of a specified type.

-T displays the file system type.

Function: Check the file system for disk space consumption. You can use this command to get how much space the hard disk is occupied and how much space is left.

Syntax: DF [Options]

Description: The DF command in Linux shows the use of the I node and disk block by all file systems.

Description: The various options of the DF command in Linux have the following meanings:

-a displays disk usage for all file systems, including 0 block file systems, such as the/proc file system.

-K is displayed in K-byte units.

-I displays the I-node information, not the disk block.

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

-x Lists disk space usage (contrary to the T option) that is not a file system of a specified type.

-T displays the file system type.

Example 1: Lists the disk space usage for each file system.

$ df

FileSystem 1 K-blocks Used Available use% mounted on

/dev/hda2 1361587 1246406 44823 97%/

The 1th column of the output list for the DF command in Linux is the pathname of the device file that represents the file system (typically the partition on the hard disk); The 2nd column gives the number of data blocks (1024 bytes) that the partition contains, and the 3rd, 4 columns represent the number of used and available blocks of data. The user may be surprised that the sum of the 3rd, 4 column blocks is not equal to the number of blocks in column 2nd. This is because the default partition leaves a small amount of space for system administrators to use. Even if the normal user space is full, the administrator can still log in and leave the workspace needed to resolve the problem. The use% column in the list represents the percentage of normal user space usage, even if the number reaches 100%, and the partition still leaves room for the system administrator to use. Finally, the mounted on column represents the installation point for the file system.

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

$ df-ia

FileSystem inodes iused ifree iused% mounted on

/dev/hda2 352256 75043 277213 21%/

None 0 0 0 0%/proc

localhost: (pid221) 0 0 0 0%/net

Example 3: Lists the type of file system.

$ df-t

FileSystem Type 1k-blocks Used Available use% mounted on

/dev/hda2 ext2 1361587 1246405 44824 97%/

The file system in this case is a ext2 type of

[Root@rac1 ~]# DF

FileSystem 1k-blocks Used Available use% mounted on

/DEV/SDA1 3020140 2333952 532772 82%/

None 213320 0 213320 0%/dev/shm

/dev/sda2 4633108 1818088 2579668 42%/u01

/dev/sde1 524272 81104 443168 16%/OCFS

This command shows the usage of all partitions on the server. It also includes several useful parameters to help format the output:

-a displays all partitions of the system, and does not display 0-block partitions normally by default

[Root@rac1 ~]# Df-a

FileSystem 1k-blocks Used Available use% mounted on

/DEV/SDA1 3020140 2333952 532772 82%/

None 0 0 0-//proc

None 0 0 0-/sys

None 0 0 0-/dev/pts

None 213320 0 213320 0%/dev/shm

/dev/sda2 4633108 1818096 2579660 42%/u01

None 0 0 0-/proc/sys/fs/binfmt_misc

SUNRPC 0 0 0-/var/lib/nfs/rpc_pipefs

Configfs 0 0 0-/config

Ocfs2_dlmfs 0 0 0-/DLM

/dev/sde1 524272 81104 443168 16%/OCFS

Oracleasmfs 0 0 0-/dev/oracleasm

-H more Current disk space and usage to be displayed in a more readable way

[Root@rac1 ~]# Df-h

FileSystem Size Used Avail use% mounted on

/DEV/SDA1 2.9G 2.3G 521M 82%/

None 209M 0 209M 0%/dev/shm

/dev/sda2 4.5G 1.8G 2.5G 42%/u01

/dev/sde1 512M 80M 433M 16%/OCFS

The-h parameter is the same on the H-root, but in the radical, 1000 instead of 1024 is used for capacity conversion

[Root@rac1 ~]# Df-h

FileSystem Size Used Avail use% mounted on

/DEV/SDA1 3.1G 2.4G 546M 82%/

None 219M 0 219M 0%/dev/shm

/dev/sda2 4.8G 1.9G 2.7G 42%/u01

/dev/sde1 537M 84M 454M 16%/OCFS

-K displays disk usage in units

[Root@rac1 ~]# Df-k

FileSystem 1k-blocks Used Available use% mounted on

/DEV/SDA1 3020140 2333952 532772 82%/

None 213320 0 213320 0%/dev/shm

/dev/sda2 4633108 1818152 2579604 42%/u01

/dev/sde1 524272 81104 443168 16%/OCFS

-L Displays the disk space usage of the local partition, and if the server NFS the remote server's disk, then the system displays the results after the NSF drive is filtered after DF plus-l

-I displays the usage of the inode. Linux uses a pointer-like approach to managing disk space innuendo. It's also a better than

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.