Suppose that there are five hard links for /home
. The five hard links are /home/.
, /home/..
, and for the three subdirs s
of /home
/home/s/..
. Note that if /home
is on its own partition, then the references to /home/..
and /home/.
are identical, however /home/..
is nonetheless evaluated to /
. This is because every directory has entries for .
and ..
, even a root directory. If instead /home
were a plain subdirectory of /
, then /home
had still five hard links since now /home
(as a directory entry of /
) points to /home
.
Final note: yes, it is possible to hard link a directory to another directory, but only root can do that for a good reason: the file system tree must not contain cycles.
/home
then? – Tim Oct 02 '14 at 17:51