Inode
In Unix computing, an inode is a data structure on a file system that stores basic information about a file, directory, or other file system object. This information includes:
- The size of the file and its physical location (if the file resides on a block device, such as a hard disk);
- The file's owner and group;
- The file mode, which determines what users can read, write, and execute the file;
- Timestamps telling when the inode was created, last modified, and last accessed; and
- A reference count telling how many hard links point to the inode.
The term inode usually refers to inodes on block devices that manage regular files, directories, and symbolic links. The concept is particularly important to the recovery of damaged file systems.
Each inode has an inode number that is unique within its device. All files are hard links to inodes. Whenever a program refers to a file by name, the system uses the filename to look up the corresponding inode, which gives the system the information it needs about the file to perform further operations.
The stat system call retrieves a file's inode number and some of the information in the inode.
This article is a stub. You can help Wikipedia by expanding it.