From owner-freebsd-hackers@FreeBSD.ORG Wed May 24 01:42:59 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2A93216A6C2 for ; Wed, 24 May 2006 01:42:59 +0000 (UTC) (envelope-from boris@brooknet.com.au) Received: from jay.exetel.com.au (jay.exetel.com.au [220.233.0.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4DE0A43D5A for ; Wed, 24 May 2006 01:42:56 +0000 (GMT) (envelope-from boris@brooknet.com.au) Received: (qmail 25700 invoked by uid 507); 24 May 2006 11:42:55 +1000 Received: from 180.205.233.220.exetel.com.au (HELO ?192.168.0.157?) (220.233.205.180) by jay.exetel.com.au with SMTP; 24 May 2006 11:42:55 +1000 In-Reply-To: <20060523.182218.19235.1026225@webmail29.nyc.untd.com> References: <20060523.182218.19235.1026225@webmail29.nyc.untd.com> Mime-Version: 1.0 (Apple Message framework v750) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <61DC5A82-3742-4FB0-9B7E-9655F4E4FC60@brooknet.com.au> Content-Transfer-Encoding: 7bit From: Sam Lawrance Date: Wed, 24 May 2006 11:42:51 +1000 To: gs_stoller@juno.com X-Mailer: Apple Mail (2.750) Cc: freebsd-hackers@freebsd.org Subject: Re: The 'ln -s' command X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2006 01:42:59 -0000 On 24/05/2006, at 1:21 AM, gs_stoller@juno.com wrote: > I tried the 'ln -s' command in bothe 4.3 & 4.7 in a situation > where it should fail and it did, but it still had a return/exit > code of 0 , I think it should have been nonzero. I tried 'ln -s > a b' where the file b existed (and was a directory) and I wanted > to create the file named a also pointing to it. The correct form > was 'ln -s b a'. See the synopsis in the manpage for 'ln'. It exited nonzero because you successfully put a symlink under the directory 'b', pointing to 'a'. oddie:~ sam$ mkdir b oddie:~ sam$ ln -s a b oddie:~ sam$ ls -l b total 8 lrwxr-xr-x 1 sam sam 1 May 24 11:42 a -> a