From owner-freebsd-current@FreeBSD.ORG Wed Jan 12 01:13:59 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0FE0316A4CE for ; Wed, 12 Jan 2005 01:13:59 +0000 (GMT) Received: from mail.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id D7AC143D3F for ; Wed, 12 Jan 2005 01:13:58 +0000 (GMT) (envelope-from julian@elischer.org) Received: from elischer.org (julian.vicor-nb.com [208.206.78.97]) by mail.vicor-nb.com (Postfix) with ESMTP id B90A17A403; Tue, 11 Jan 2005 17:13:58 -0800 (PST) Message-ID: <41E479D6.4090409@elischer.org> Date: Tue, 11 Jan 2005 17:13:58 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3.1) Gecko/20030516 X-Accept-Language: en, hu MIME-Version: 1.0 To: Sean McNeil References: <41E47226.8050001@elischer.org> <1105491274.67086.2.camel@server.mcneil.com> In-Reply-To: <1105491274.67086.2.camel@server.mcneil.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: FreeBSD Current Subject: Re: test(1) unexpected result (to me) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jan 2005 01:13:59 -0000 never mind.. pilot error.. # ls -lL /sys lrwxrwxrwx 1 root wheel 11 Sep 4 22:03 /sys -> usr/src/sys # ls -l /usr/src/sys ls: /usr/src/sys: No such file or directory # mkdir /usr/src/sys # # if [ /sys -ef /usr/src/sys ] > then > echo same > else > echo no > fi same Sean McNeil wrote: >On Tue, 2005-01-11 at 16:41 -0800, Julian Elischer wrote: > > >># ls -l /sys >>lrwxrwxrwx 1 root wheel 11 Sep 4 22:03 /sys -> usr/src/sys >># if [ /sys -ef /usr/src/sys ] >> > then >> > echo same >> > else >> > echo no >> > fi >>no >> >> >>I would have expected the result "same" >> >>comments? >> >> > >By "same file" they mean each references the same inode. Since this is >a symlink, the files do not refer to the same file. > >You can see that if it were a hard link the result would be "same" >echoed. > >Cheers, >Sean > > >