Questions: Directory Structures and Path Resolution

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A Unix file /home/alice/project.txt has a link count of 2. Alice runs 'rm /home/alice/project.txt'. What happens to the file's data on disk?

AThe file data is immediately deleted because rm removes files
BThe data is moved to a trash folder and deleted after 30 days
CThe file data persists because a second hard link still points to the same inode; only this directory entry is removed and the link count drops to 1
DThe file data is corrupted because removing one hard link damages the shared inode
Question 2 Multiple Choice

A user tries to create a hard link on filesystem A pointing to a file on a mounted external drive (filesystem B). The OS refuses. Why?

AHard links can only be created by root for security reasons
BHard links cannot span file systems because inode numbers are only unique within a single file system; the reference would be meaningless on the other device
CHard links are not supported on external drives, only on the main partition
DThe OS refuses because cross-filesystem hard links would create cycles in the directory tree
Question 3 True / False

Moving a file to a different directory within the same file system is instantaneous regardless of file size, because the operation only updates directory entries without touching the file's data blocks.

TTrue
FFalse
Question 4 True / False

Creating a hard link to a file produces a second copy of the file's data blocks, similar to the cp command.

TTrue
FFalse
Question 5 Short Answer

Explain what causes a symbolic link to 'dangle,' and why this cannot happen with a hard link pointing to the same target file.

Think about your answer, then reveal below.