Select the THREE statements that are true about links on a Linux filesystem.
LPIC-1 Exam 101-500, objective 104. Devices, Linux filesystems, filesystem hierarchy standard hard
Draft — not checked yet. This question was written from the published exam objectives and cites the clause it comes from, but nobody has yet read it against that clause and signed for it.
It is kept out of search results and out of mock exams until they have. Read the source below before you take the answer as settled.
The options
Choose 3.
Correct A hard link and the name it was created from refer to the same inode.
True. That is the definition of a hard link: another directory entry for one inode. `ls -i` shows both names sharing an inode number.
Not correct A hard link may point at a file on another mounted filesystem.
False. Inode numbers are unique only within a single filesystem, so `ln` across a mount point fails with 'Invalid cross-device link'. Use ln -s instead.
Correct A symbolic link may point at a target on a different filesystem.
True. A symlink stores a path string, which the kernel resolves at access time, so nothing constrains it to one filesystem — or even to an existing target.
Not correct A symbolic link keeps resolving to the data after its target is deleted.
False. It becomes a dangling link: the path it stores no longer exists, so opening it fails with 'No such file or directory' even though the link itself is plainly visible in ls.
Correct Deleting the name a hard link was created from leaves the data accessible through the link.
True. Every hard link is equally the file. Removing one name only decrements the inode's link count.
Why
Hard links share an inode: same data, same permissions, same link count, confined to one filesystem, and normally not permitted on directories. Symbolic links are small files holding a path: they may cross filesystems, may point at directories, may dangle, and carry their own (usually irrelevant) permission bits. Use `ls -l` to spot the arrow of a symlink and the link count of a hard-linked file.
Where this comes from
- Cited
- LPI exam objective 104.6
- What it says
- Create and identify hard and symbolic links and know their differences.
Practise this
Reading one question is not practice. The trainer will draw a set from objective 104 and space the ones you get wrong.