The difference between df-i and df-h

Source: Internet
Author: User

the difference between df-i and df-h


These days patrol the database, found that the script has df-h and Df-i command began not care, later found that the two are not the same


[ORACLE@HVR ~]$ Df-h
FileSystem Size Used Avail use% mounted on
/dev/mapper/vg_hvr-lv_root 26G 12G 13G 49%/
Tmpfs 1004M 72K 1004M 1%/DEV/SHM
/DEV/SDA1 485M 39M 421M 9%/boot


[ORACLE@HVR ~]$ Df-i
FileSystem inodes iused ifree iuse% mounted on
/dev/mapper/vg_hvr-lv_root 1676080 137553 1538527 9%/
TMPFS 256823 3 256820 1%/DEV/SHM
/DEV/SDA1 128016 127977 1%/boot


The comparison shows that the contents are completely inconsistent.

Df-h is a display of the current file system space usage, this command often used to not say.

Df-i I parameter refers to the Inode

A few aspects of Indoe information

1 bytes of File

2 User ID, group ID of Owner

3 file read and write execution permissions

4 file timestamp CTime changetime mtime Modify Atime Access

5 Soft connection and hard link ln

6 File Block Location

These can be displayed using the Stat command, such as I look at the inode information

[ORACLE@HVR ~]$ Stat/
File: '/'
size:4096 blocks:8 IO block:4096 Directory
device:fd00h/64768d Inode:2 links:28
Access: (0555/dr-xr-xr-x) Uid: (0/root) Gid: (0/root)
access:2016-03-29 09:23:19.918005014 +0800
modify:2016-03-31 01:19:05.042000004 +0800
change:2016-03-31 01:19:05.042000004 +0800

In fact, these are not important, it is important to see whether the file system Inode is used up (small files occupy a large number of inode), to avoid the use of df-h view space there are many, but just can't create new directories and files

So we have to focus on Df-i's ifree.

Summary: Df-h focus on remaining space df-i focus on remaining inode





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.