Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!zaphod.mps.ohio-state.edu!mips!sgi!rpw3@rigden.wpd.sgi.com From: rpw3@rigden.wpd.sgi.com (Rob Warnock) Newsgroups: comp.sys.sgi Subject: Re: SGI symlink bug? Message-ID: <62307@sgi.sgi.com> Date: 15 Jun 90 02:33:52 GMT References: <9006140634.aa20043@WOLF.BRL.MIL> <62256@sgi.sgi.com> <900@idunno.Princeton.EDU> Sender: rpw3@rigden.wpd.sgi.com Reply-To: rpw3@sgi.com (Rob Warnock) Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 36 In article <900@idunno.Princeton.EDU> viktor@cucumber.princeton.edu (Viktor Dukhovni) writes: +--------------- | vjs@rhyolite.wpd.sgi.com (Vernon Schryver) writes: | >I think the reason our `ln -s for bar` kills the target is because `ln foo | >bar` and `mv foo bar` are always effective in the SVR3 world. It seems to | >me that `ln` and `ln -s` should be as identical as possible, except in the | >nature of the link they make. It would be bad if `ln foo bar` would | >succeed where `ln -s foo bar` would fail. | | It is the behaviour of "ln" that seems wrong! Note the | corresponding system call ln(2) will fail with EEXIST. "ln" must take | special precaution to unlink the target before making the link, this | is unnatural. +--------------- But the ln(1) *program* does succeed, even with hard links. Try this on your favorite S5r3 system: % touch foo bar % ls -li foo bar 12151 -rw-r--r-- 1 rpw3 engr 0 Jun 14 19:31 bar 12147 -rw-r--r-- 1 rpw3 engr 0 Jun 14 19:31 foo % ln foo bar % ls -li foo bar 12147 -rw-r--r-- 2 rpw3 engr 0 Jun 14 19:31 bar 12147 -rw-r--r-- 2 rpw3 engr 0 Jun 14 19:31 foo Sorry, that's System-V... :-{ -Rob ----- Rob Warnock, MS-9U/510 rpw3@sgi.com rpw3@pei.com Silicon Graphics, Inc. (415)335-1673 Protocol Engines, Inc. 2011 N. Shoreline Blvd. Mountain View, CA 94039-7311