home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.questions
- Path: sparky!uunet!das.wang.com!wang!fredj
- From: fredj@wang.com (Fast Freddie)
- Subject: Re: Is it a bad idea to 'link' directories?
- Organization: Wang Labs, Lowell MA, USA
- Date: Tue, 21 Jul 92 15:05:54 GMT
- Message-ID: <brqv9v.2mz@wang.com>
- References: <1992Jul14.191511.22320@csi.uottawa.ca> <13525@auspex-gw.auspex.com>
- Keywords: link
- Sender: news@wang.com
- Lines: 29
-
- guy@Auspex.COM (Guy Harris) writes:
-
- >>Is it a bad idea to, say, link /usr/man/man1 to /usr/man/man.1,
-
- >If "link" means "make a hard link", well, yes, it's generally not a good
- >idea. Various code that deals with the file system thinks that the only
- >hard links to a directory are 1) the link that gives it its name, 2) the
- >"." link, and 3) the ".." links in its subdirectories, if any. Adding
- >an additional hard link will probably confuse that code (e.g., "find").
-
- >If "link" means "make a symbolic link", yes, it's OK (assuming, of
- >course, your system *supports* symbolic links; not all UNIX systems do).
-
- The only comment that i would like to make is that if your system supports
- "soft"/symbolic links one *MUST* be careful *NOT* to make these links
- recursive or if there are several links the last should not point back to
- the first. Some Unix OS's will only loop for a while than give you an
- error message. Others will go on endlessly trying to resolve the recursive
- path name; appearing as if the process is "hung".
-
-
- >>I ask this because 'ln' doesn't let you link directories but 'link' does.
-
- >"link" is intended to be used only by somebody who knows the above, so
- >it doesn't bother doing checking - it's just a wrapper around the
- >"link()" call. "ln" is the one to be used by ordinary users, and may do
- >extra checking, e.g. making sure you don't make hard links to
- >directories, even if the file system code lets you (for example, if
- >you're super-user).
-