From owner-freebsd-current@FreeBSD.ORG Wed Jan 12 01:10:07 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 5591116A4CE for ; Wed, 12 Jan 2005 01:10:07 +0000 (GMT) Received: from mail.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 383A143D1D for ; Wed, 12 Jan 2005 01:10:07 +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 160F27A403; Tue, 11 Jan 2005 17:10:07 -0800 (PST) Message-ID: <41E478EF.9040508@elischer.org> Date: Tue, 11 Jan 2005 17:10:07 -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=us-ascii; 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:10:07 -0000 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. > > yes, but this leaves us with no way to check that a file and a symlink are the same. >Cheers, >Sean > > >