Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!swrinde!emory!hubcap!mephisto!mcnc!rti!dg-rtp!larrybud.rtp.dg.com!goudreau From: goudreau@larrybud.rtp.dg.com (Bob Goudreau) Newsgroups: comp.unix.wizards Subject: Re: Hard links to directories: why not? Message-ID: <1990Jul23.181554.17938@dg-rtp.dg.com> Date: 23 Jul 90 18:15:54 GMT References: <5222@milton.u.washington.edu> <6940@eos.UUCP> <1990Jul19.115622.14015@mips2.cr.bull.com> <11070@alice.UUCP> <1990Jul22.175123.5323@athena.mit.edu> <837@ehviea.ine.philips.nl> Sender: usenet@dg-rtp.dg.com (Usenet Administration) Reply-To: goudreau@larrybud.rtp.dg.com (Bob Goudreau) Organization: Data General Corporation, Research Triangle Park, NC Lines: 29 In article <837@ehviea.ine.philips.nl>, leo@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@dg-rtp.dg.com Research Triangle Park, NC 27709 ...!mcnc!rti!xyzzy!goudreau USA