Welcome to the Linux Foundation Forum!

16. -- Hard Links

Either this text in the section "Hard and Soft Links" is wrong, or I am completely misunderstanding it (probably the latter):

"All hard linked files have to be on the same filesystem. Changing the content of a hard linked file in one place may not change it in other places."

  1. I guess the first sentence implies sth like "... as the directory file" ?
  2. As for the second sentence... I thought a hard link is like a shared pointer (to the inode and in extension also to the content), but then of course changing the content in one place would change it for all places.

Is there sth wrong with the "shared pointer" metapher? Or does the second sentence mean sth. different that I did not understand yet?

Thanks for clarifications!

Best Answer

Answers

  • cfuchs
    cfuchs Posts: 15

    (actually I was in the wrong forum LFD201 to begin with, I am taking LFS201; maybe a typo on my side or a bad link in the material, although when I check now, the link in the LFS201 course seems to be correct now)

Categories

Upcoming Training