Hard linkx

Cameron Simpson cs at zip.com.au
Sat Nov 21 04:29:50 UTC 2009


On 21Nov2009 12:06, Raj Har <raj4list at gmail.com> wrote:
| anybody can explain  why we can not make hard link of
| directory.

The short answer is that it opens up a large set of problems.

If you can hard link a directory, what does "cd .." mean?
(There are multiple answers to this, including the account's one: "what
do you _want_ it to mean?")

If you can hard link a directory, you can make loops in the filesystem,
making a directory tree seem infinitely deep.

Finally, please nominate specific tasks that can be accomplished with
directory hard links that cannot be accomplish with other mechanisms.
(Clue: chroot and "mount --bind" et al.)

Cheers,
-- 
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

You can strap the chip to the package, but the strap costs more than the chip.
- overhead by WIRED at the Intelligent Printing conference Oct2006




More information about the redhat-list mailing list