From owner-freebsd-questions Sun Oct 25 04:13:30 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA09658 for freebsd-questions-outgoing; Sun, 25 Oct 1998 04:13:30 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from terra.stack.nl (terra.stack.nl [131.155.140.128]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA09653 for ; Sun, 25 Oct 1998 04:13:28 -0800 (PST) (envelope-from marcolz@stack.nl) Received: from toad.stack.nl (toad.stack.nl [131.155.140.135]) by terra.stack.nl (VMailer) with ESMTP id 19D4824364; Sun, 25 Oct 1998 13:12:53 +0100 (MET) Received: by toad.stack.nl (VMailer, from userid 333) id C3D669655; Sun, 25 Oct 1998 13:13:56 +0100 (CET) Message-ID: <19981025131356.A12915@stack.nl> Date: Sun, 25 Oct 1998 13:13:56 +0100 From: Marc Olzheim To: freebsd-questions@FreeBSD.ORG Cc: unix@stack.nl Subject: Strange symlink behaviour Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i X-Operating-System: FreeBSD toad.stack.nl 2.2.7-STABLE FreeBSD 2.2.7-STABLE Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi. I found some strange (at least to my perception) behaviour of symlinks using FreeBSD. All versions of FreeBSD I checked it on showed it: 2.1.0-RELEASE 2.1.5-RELEASE 2.2.5-RELEASE 2.2.6-RELEASE 2.2.7-RELEASE snail:/tmp/test>ls -l total 2 -rw-r--r-- 1 marcolz bin 0 Oct 25 12:46 a -rw-r--r-- 1 marcolz bin 1 Oct 25 12:46 b -rw-r--r-- 1 marcolz bin 2 Oct 25 12:46 c lrwxrwxrwx 1 marcolz bin 1 Oct 25 12:46 d -> a lrwxrwxrwx 1 marcolz bin 1 Oct 25 12:46 e -> b snail:/tmp/test>mv c d snail:/tmp/test>ls -l total 2 -rw-r--r-- 1 marcolz bin 0 Oct 25 12:46 a -rw-r--r-- 1 marcolz bin 1 Oct 25 12:46 b -rw-r--r-- 1 marcolz bin 2 Oct 25 12:46 d lrwxrwxrwx 1 marcolz bin 1 Oct 25 12:46 e -> b This seems OK, but: snail:/tmp/test>mv d e/ snail:/tmp/test>ls -l total 1 -rw-r--r-- 1 marcolz bin 0 Oct 25 12:46 a -rw-r--r-- 1 marcolz bin 2 Oct 25 12:46 b lrwxrwxrwx 1 marcolz bin 1 Oct 25 12:46 e -> b snail:/tmp/test> Is this normal behaviour ? following the link if there's a '/' appended ? I mean it isn't a directory or a link to one... And if this is normal: how to follow two links then ? since: snail:/tmp/test>ls -l total 1 -rw-r--r-- 1 marcolz bin 0 Oct 25 12:54 a lrwxrwxrwx 1 marcolz bin 1 Oct 25 12:54 b -> a lrwxrwxrwx 1 marcolz bin 1 Oct 25 12:54 c -> b -rw-r--r-- 1 marcolz bin 1 Oct 25 12:55 d snail:/tmp/test>mv d c// snail:/tmp/test>ls -l total 1 -rw-r--r-- 1 marcolz bin 0 Oct 25 12:54 a -rw-r--r-- 1 marcolz bin 1 Oct 25 12:55 b lrwxrwxrwx 1 marcolz bin 1 Oct 25 12:54 c -> b snail:/tmp/test> I'm quite eager to hear an explanation, since I couldn't find anything about this in the man pages or in the FAQ. Marc To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message