About inode article is to explain the reading public in which a number of articles link: https: //mp.weixin.qq.com/s/ZrENe9ACUWqHHTDjRG5iTg
Article mentioned must be understood from the inode file storage talk, it relates to the concept of " 'sector' '(Sector)" block "(Block)" meta-information. "
Sector: Hard smallest unit of memory called "sectors" , each sector of 512 bytes. (About 0.5K)
Block: the operating system when the hard disk is read one time reading a plurality of sectors (one sector is read a low efficiency), reads a one-time only "block." A plurality of sectors "block", is the minimum unit of file access.
Metadata: data files are stored in the "block", then it is clear that we must find a place to meta-information stored in the file , such as the creator of the file, the file creation date, file size, and so on. This meta-information file storage area is called the inode , Chinese translation of "inode." (Text taken from the text)
Use stat command to view the file information inodes
inode contains meta-information file, specifically, have the following:
-
Number of bytes in the file
-
User ID file owner
-
Group ID documents
-
Read files, write, and execute permissions
-
Timestamp file, there are three:
-
ctime inode refers to a time of change
-
mtime time refers to the time the contents of the file changes
-
atime refers to a file open time
-
The number of links that point to the number of file names inode (cut icon red place)
-
The location of the file data block
About inode size
inode will consume disk space, so the hard disk formatting, the operating system automatically hard disk into two regions. A data area storing the file data; the other is a region inode (inode Table), the information stored inode contains.
Each of the inode size, typically 128 bytes or 256 bytes. The total number of the inode is, for a given when formatting, usually per 1KB 2KB or sets a per inode. Assuming a 1GB hard disk, the size of each of the inode is 128 bytes, sets a 1KB each inode, the inode table size that will reach 128MB, accounting for 12.8% of the entire hard drive.