Inodes
Inode - Index Node
- The index number is the unique identifier (inode number) assigned by the filesystem to every object (file/directory) upon creation. Inode numbers are dynamic and tied to the specific filesystem instance. They are not persistent across different machine images or re-formatted volumes.
Low-Level Context
The inode is a data structure in the inode table
- Stored Metadata: Permissions, UID/GID, Timestamps, Size, and Data Block Pointers.
- Missing Data: The inode does not store the filename. Filenames are stored in the directory entry (
dentry), which maps a name to an inode number - To retrieve the inode number of a specific file:`
ls -i <file>#ls orstat <file>#stat
- Code References (VFS)
struct inodeininclude/Linux/fs.hstruct dentryininclude/Linux/dcache.h