Inode
An inode is a filesystem object that holds a file's metadata and has a filesystem-local number, distinct from the directory names and open file descriptions that refer to the file.
On Linux, stat() exposes the inode number as st_ino, the containing device as st_dev, and the hard-link count as st_nlink. Inode numbers alone are not unique across filesystems. A pathname replacement can select a different inode while an existing descriptor still refers to the previous file; inode identity is therefore different from pathname identity and from a content version.
Relations
- related
- hard-link, unlink, atomic-rename, open-file-description
Advantages
- Separates file metadata and identity from the names used to reach a file.
Limitations
- An inode number alone is not a globally unique or permanent content identifier.
- Matching inode identity does not imply unchanged file contents or a shared open file description.