Penguin
Note: You are viewing an old revision of this page. View the current version.

A HardLink is when two directory entries point to one inode. Compare with a SoftLink.

You cannot HardLink across filesystems, you will get a EXDEV.

You cannot HardLink directories, "." and ".."'s are already hardlinks to the current and parent directories respectively. The root directories ".." entry points to "." as well. Programs such as find(1) use the knowledge that "." and ".." are the only two hardlinks, and therefore know that after they have processed (number of links + 2) subdirectories that they have found them all, and they nolonger have to stat(1) every file in the directory to see if it's a subdirectory.

Since you can only have 256 odd hardlinks to a file, does this mean that you can only have 256 subdirectories? surely not?