After successfully creating a hard link called bar to the ordinary file foo, foo is deleted from the filesystem. Which of the following describes the resulting situation?
A.
foo and bar would both be removed.
B.
foo would be removed while bar would remain accessible.
C.
foo would be removed. bar would still exist but would be unusable.
D.
Both foo and bar would remain accessible.
E.
The user is prompted whether bar should be removed, too.
If a hard link bar is created for an ordinary file foo, and then foo is deleted from the filesystem, the data and metadata associated with the file will remain on the filesystem, and the hard link bar will still be valid.
When a hard link is created, it simply creates another name (i.e., another directory entry) for the same file on the filesystem. Both the original file and the hard link(s) reference the same data blocks and inode, which contain the file's content and metadata.
Deleting the original file foo does not actually remove the data or inode from the filesystem; it simply removes one of the directory entries that points to it. As long as at least one hard link to the file remains on the filesystem (in this case, the hard link bar), the file's data and metadata will continue to exist.
upvoted 1 times
...
This section is not available anymore. Please use the main Exam Page.LX0-103 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
linux_admin
2 years, 2 months ago