Inode

From LQWiki
Jump to navigation Jump to search

An inode is an element of an inode table which is an element of the filesystem. When creating a filesystem on disk, a region mapping out the partition and structure as a whole is created, followed by the region of the inode table, followed by the actual data blocks which contain the files of the filesystem. Each inode has a single unique number by which it is known to the system. This is how hard links are created - two (or more) name descriptions reference a single inode number. Many of the tools which modify file characteristics manipulate the data an inode contains. This text is a file stored in blocks on a disk, at a physical location separate from the inode table. Which blocks those are and how large the file is, what type of file they contain, what permissions this file has (chmod), who owns it (chown, chgrp), and what timestamps (touch), are elements of the inode structure.

From the user's point of view, John Doe is the owner of the Great_American_Novel.txt. To the system, UID 1000 has 0600 access to Inode 151032. This can be seen with stat which largely details the information of an inode.