On Sun, Dec 12, 2010 at 12:31 PM, Jean-Francois <[email protected]> wrote:
> May someone help me to understand how exactly hard links works ? To some
> extend U understood that a hard link is indistinguishable from the "original"
> yet it must be so that the datas are linked-back to all the hard links
> pointing on it, correct ?

hard link is a misnomer.  All files are hard linked at least once,
some just have more than one link.

All data about a file except name including size, owner, date, etc.,
are stored in the inode.  A directory is just a list of names and
inodes.  If two names have the same inode, you have a hard link.
Neither name is more original or important than the other.  After the
fact, they cannot be distinguished.

rm (and unlink) simply delete a name from a directory, not a file.
The file itself is automatically deleted when the number of names
pointing to it goes it zero.

Reply via email to