Hard links to directories: why not?
Bob Goudreau
goudreau at larrybud.rtp.dg.com
Tue Jul 24 04:15:54 AEST 1990
In article <837 at ehviea.ine.philips.nl>, leo at ehviea.ine.philips.nl (Leo
de Wit) writes:
>
> |For example, "find" has no trouble at all dealing with symbolic links,
> |but it can quite easily get into a looping state if it encounters a
> |hard-linked directory pointing higher up in the directory structure.
>
> No need for that if find only - recursively - follows those
> subdirectories 'sub' for which the inode of 'sub/..' is the same as
> that of '.' ...
... thus defeating the purpose of find, since the user doesn't get
what he expected to get (namely, the entire directory tree descending
from his specified target). At least with symlinks, the user has an
obvious and easy way to determine whether or not a directory entry
will result in find hitting a dead-end: if "ls -l" shows that the
entry represents a symlink, then find won't traverse it. But what
does your scheme really buy that symlinks don't? It seems to me
that your non-primary hard links are just local symlinks in disguise,
except that it would now be even less obvious to the user that such
links are liable to surprise him.
------------------------------------------------------------------------
Bob Goudreau +1 919 248 6231
Data General Corporation
62 Alexander Drive goudreau at dg-rtp.dg.com
Research Triangle Park, NC 27709 ...!mcnc!rti!xyzzy!goudreau
USA
More information about the Comp.unix.wizards
mailing list