The Inode concept in Linux

Source: Internet
Author: User

The Inode concept in Linux
Inode in Linux

To understand the inode, begin with the file storage. The file is stored on the hard disk, then the smallest storage unit in the hard disk is called "Sector", here simply jump out, and tell you a simple explanation of what is called sector, such as:

The following is a single hard disk disc, a hard disk is a number of the same platters (specific details of other concepts, we choose the day), here is concerned about the sector.

On a single platter, there are many concentric circles in place from the inside, each concentric circle is called a track

A number of longitudinal tangents are divided by a certain degree from the center to the outside, and each track is cut into several, each cutting track is called a sector, and the sector is the smallest unit of hard disk storage data.

In general, each sector can store 512 bytes, which is equivalent to 0.5k (512/1024=0.5).

Although the sector (sector) is the smallest unit of data stored on the hard disk, the operating system reads the hard disk, but it does not read a sector of the sector, so the efficiency is too slow, the operating system is "block" for the unit to read and write. block, which is composed of multiple sectors, is the smallest unit of operating system file access. Different operating systems support different block sizes, and the most common block size is 4KB, which consists of a contiguous block of 8 sectors (sector).

File information is stored in the "block", then obviously, we also have to find a place to store the meta-information of the file, so-called file meta-information, in addition to the contents of the file and the file related to some of the attributes, such as the creator of the file, the size of the file and so on. These meta-information is not stored in a mix of file content information, which is called an inode. A Chinese translation can be called an index node.

Then the inode contains the meta-information about the file, specifically, there are several things:

* Number of bytes in the file

* User ID of the owner of the file

* The group ID of the file

* file read, write, execute permissions

* File timestamp (approximately three related timestamps, ctime refers to the time of the last change, mtime refers to the time the file content was last changed, Atime refers to the last time the file was opened)

* Number of links, that is, how many filenames point to this inode

* Location of File data block

The Inode concept in Linux

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.