Computer Science, asked by csaptarshi337, 1 year ago

what happens when you create hard link to a text file and then you delete the text file

Answers

Answered by maryamkincsem
7

In order to understand what happens in this action, look at the following:

Hard link:

-It is a directory entry which associates a name with a file on a file system.

-Its role is that all directory-based file systems must have at least one hard link giving the original name for each file.

-In file systems when there is more than one link for the same file, hard links are associated with such files.

- Creating a hard link has the effect of giving one file multiple names (e.g. different names in different directories)

If a hard link is created for a text file. Then the original text file is deleted, then basically a copy of that file's name is created, in a sense that original file gets deleted.

That's why when you create hard link to a text file and then you delete the text file, it erases the entire, total data of the original file.

Ans: it ultimately erasers the total data present.


Similar questions