INode
Each inode stores the attributes and disk block locations of the object’s data. POSIX per-file system unique identifier for a file (each drive being an independant filesystem) - wikipedia / File System Continued
Hardlink
Allows to share content + metadata except the name which may differ. hardlink cannot link to directory => This would cause a loop in the filesystem and that’s why it’s prohibited by the filesystem
$ find . -inum 1234
Symlink
In Linux, a symlink (symbolic link) itself is a separate file, and it has its own metadata, independent of the target file.
Metadata Stored on a Symlink (Independent of Target)
- File Type: symlink
- Ownership (User and Group): A symlink has its own owner (UID) and group (GID).
- Timestamps
- Size: The size of a symlink is the length of the path it stores
What Metadata is NOT Stored in a Symlink?
- File content
- target file permission
- target file size
Written on May 2, 2021, Last update on November 3, 2023
file
filesystem