Question 600
Following lab verification, document the preventive or persistence-oriented procedure for: Two paths should reference the same inode so edits through either name appear in the other, entirely on one file system. Which practice is most suitable?
Explanation
Correct Answer
Use hard links only for same-filesystem files and document how unlinking each name affects retention. This guards against recurrence of: Hard links name the same inode and cannot ordinarily link across separate file systems. Confirm the lab's final state by: `stat -c '%i %h'` reports the same inode and an increased link count for both paths.
Incorrect Answers
Constrain glob paths and check match existence before iterating over files. That control is best suited to a separate scenario: A shell script is supposed to process every `.conf` file, but its wildcard is quoted as a single literal. It is not the best safeguard for the current mechanism: Hard links name the same inode and cannot ordinarily link across separate file systems.
Check effective identity and environment before privileged operations, then return to a normal account. That control is best suited to a separate scenario: A student becomes root with `su` but finds the previous user's PATH and working directory still active during an administrative test. It is not the best safeguard for the current mechanism: Hard links name the same inode and cannot ordinarily link across separate file systems.
Manage known host fingerprints and investigate unexpected key changes instead of setting StrictHostKeyChecking=no. That control is best suited to a separate scenario: A first SSH connection warns that the server identity is unknown, and a student proposes disabling host key checks globally. It is not the best safeguard for the current mechanism: Hard links name the same inode and cannot ordinarily link across separate file systems.