188k views
1 vote
Deleting a source file will break an associated hard link.
a) True
b) False

1 Answer

4 votes

Final answer:

Deleting a source file does not break an associated hard link. This is because a hard link is a direct pointer to the file's data on the disk, and the data will remain as long as there is a hard link referencing it.

Step-by-step explanation:

The statement that deleting a source file will break an associated hard link is false. In operating systems, especially Unix-like systems, a hard link is essentially a direct pointer to the data on the disk. When you create a hard link, it points to the same inode (the data structure that stores information about a file on a filesystem) as the original file. Therefore, deleting the source file does not actually delete the data on the disk as long as there is at least one hard link pointing to it. The data will remain intact and accessible through the hard link. Only when the last hard link to an inode is deleted does the operating system consider the file’s data eligible for deletion. Deleting a source file does not break an associated hard link. In a hard link, multiple directory entries point to the same inode on the disk. If you delete one directory entry (source file), the link count decreases by 1, but the data in the inode is not immediately released. The file data is only deallocated when the link count drops to zero. Other hard links to the same inode remain intact, and users can still access the data through those links.

User LeoD
by
8.8k points