From owner-freebsd-bugs Tue Mar 9 2:32:41 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from axl.noc.iafrica.com (axl.noc.iafrica.com [196.31.1.175]) by hub.freebsd.org (Postfix) with ESMTP id 56BBC150BC; Tue, 9 Mar 1999 02:32:31 -0800 (PST) (envelope-from sheldonh@axl.noc.iafrica.com) Received: from sheldonh (helo=axl.noc.iafrica.com) by axl.noc.iafrica.com with local-esmtp (Exim 2.12 #1) id 10KJnH-000Pnl-00; Tue, 9 Mar 1999 12:31:23 +0200 From: Sheldon Hearn To: Bruce Evans Cc: freebsd-bugs@FreeBSD.ORG, wosch@FreeBSD.ORG Subject: Re: bin/1565 In-reply-to: Your message of "Tue, 09 Mar 1999 20:58:52 +1100." <199903090958.UAA08499@godzilla.zeta.org.au> Date: Tue, 09 Mar 1999 12:31:23 +0200 Message-ID: <99184.920975483@axl.noc.iafrica.com> Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Tue, 09 Mar 1999 20:58:52 +1100, Bruce Evans wrote: > (1) $ touch /tmp/z; ln -s /tmp/z ~/z1; mv ~/z1 /tmp/z > > where "~" and "/tmp" are not on the same filesystem, causes the > link to be removed instead of moved. Sure, the link is removed, but I haven't lost the referenced file. I must admit that I can't think of any alternative behaviour that I'd prefer. What _should_ happen? > (2) $ rm /tmp/z; ln -s /tmp/z ~/z1; mv ~/z1 /tmp/z > > causes the link to be moved, but then mv(1) emits a bogus error > message saying that the rename to do the move failed. As I understand things, it looks like this: ln -s /tmp/z ~/z1 make ~/z1 a symlink to /tmp/z (which doesn't exist) mv ~/z1 /tmp/z move the symlink ~/z1 to /tmp/z oops, can't "dereference" ~/z1, spit a warning And at that point, you want it to fail, rather than moving the link. Have I got it straight? Ciao, Sheldon. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message