Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!pt.cs.cmu.edu!rochester!rit!tropix!moscom!ur-valhalla!uhura.cc.rochester.edu!sunybcs!rutgers!cs.utexas.edu!uunet!murtoa.cs.mu.oz.au!mulga!munnari.oz.au!comp.vuw.ac.nz!news From: jonathan@comp.vuw.ac.nz (Jonathan) Newsgroups: comp.unix.wizards Subject: Re: Should "ls -R" traverse symlinks? Summary: On a Pyramid, probably. Keywords: symlink, ls, dual-universe Unix Message-ID: <1989Jun18.120806.4353@comp.vuw.ac.nz> Date: 22 Jul 89 12:08:06 GMT References: <558@lakart.UUCP> Reply-To: jonathan@downstage.comp.vuw.ac.nz (Jonathan) Organization: Comp Sci, Victoria University, Wellington, New Zealand. Lines: 49 In article <558@lakart.UUCP> dg@lakart.UUCP (David Goodenough) writes: >flee@shire.cs.psu.edu (Felix Lee) sez: >> No. Not unless "ls -R" detects cycles and guarantees termination. >> If you really want to traverse links, "ls -RL" is almost adequate. > >Agreed These postings have completely lost the point of the original query, which was ``Should ls -R traverse symlinks on a *Pyramid*''? Pyramid's OSx is a dual-universe Un*x implemented using conditional symbolic links---symlinks that contain the names of two files, one each for the bsd and att universe. For instance, /bin is a csymlink to .ucbbin and .attbin, respectively. Since OSx's lstat(2) does not distinguish between ordinary symlinks and csymlinks (perhaps because Pyramid didn't want to break user code that happened to do an lstat on a c-symlink; perhaps because the implementation is a kludge), having OSx commands do different things for ordinary symlinks and conditional symlinks is well-nigh impossible. Pyramid have modified several OSx commands to grok conditional symbolic links. OSx's ls follows symlinks symlinks by default, *doesn't* follow them for ls -L. (This makes sense to me. Seeing the conditional symlinks is generally not what people or shell scripts want to do. The incompatibility of ls itself is rather annoying, especially in an environment with other Unix implementations.) Since ls follows symlinks by default, it seems consistent and least surprising for ls -R to to traverse symlinks, which can lead to the problems already discussed. Perhaps an option meaning "follow conditional, but not ordinary, symlinks" is what's wanted. Despite Pyramid's inelegant implementation, there is an interesting issue here: What should the behaviour of ls (+ system calls, other commands) be when the mapping from pathnames to files is a relation rather than a function? Are there any other systems that use conditional symbolic links? Do Sequent systems deal with this issue, and if so, how? Are there any heterogenous distributed systems that use conditional symbolic links? Discussion, anyone?? -- ----------------------------------------------------------------------------- sane mailers: jonathan@comp.vuw.ac.nz | NZ Industrial democracy: UUCP path: ...!uunet!vuwcomp!jonathan | One factory, one vote!