From owner-freebsd-questions@FreeBSD.ORG Mon Mar 16 16:11:13 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD65D1065672 for ; Mon, 16 Mar 2009 16:11:13 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp02.sth.basefarm.net (ch-smtp02.sth.basefarm.net [80.76.149.213]) by mx1.freebsd.org (Postfix) with ESMTP id 867D58FC1B for ; Mon, 16 Mar 2009 16:11:13 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from c83-255-48-78.bredband.comhem.se ([83.255.48.78]:52130 helo=falcon.midgard.homeip.net) by ch-smtp02.sth.basefarm.net with smtp (Exim 4.68) (envelope-from ) id 1LjFPC-00069F-7h for freebsd-questions@freebsd.org; Mon, 16 Mar 2009 17:11:10 +0100 Received: (qmail 17894 invoked from network); 16 Mar 2009 17:11:08 +0100 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with SMTP; 16 Mar 2009 17:11:08 +0100 Received: (qmail 13291 invoked by uid 1001); 16 Mar 2009 17:11:08 +0100 Date: Mon, 16 Mar 2009 17:11:08 +0100 From: Erik Trulsson To: John Almberg Message-ID: <20090316161108.GA13255@owl.midgard.homeip.net> References: <20090316153923.GA13043@owl.midgard.homeip.net> <33BEAB1A-A0AB-4684-95EE-8C2C4328ABA7@identry.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <33BEAB1A-A0AB-4684-95EE-8C2C4328ABA7@identry.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-IP: 83.255.48.78 X-Scan-Result: No virus found in message 1LjFPC-00069F-7h. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1LjFPC-00069F-7h 56bc3c7951bf94cb3ad50e77c4cbf93a Cc: freebsd-questions@freebsd.org Subject: Re: links vs real directories X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Mar 2009 16:11:14 -0000 On Mon, Mar 16, 2009 at 11:47:23AM -0400, John Almberg wrote: > > On Mar 16, 2009, at 11:39 AM, Erik Trulsson wrote: > > > On Mon, Mar 16, 2009 at 11:22:13AM -0400, John Almberg wrote: > >> I always thought that links to real directories were pretty much the > >> same as real directories, but I've just discovered a situation where > >> they are not and I'm wondering if I'm doing something wrong... > > > > A *soft* link to a directory entry (be it a directory or a file or > > something > > else) is not quite equivalent to the original entry since they are > > easily > > distinguished and some programs do treat softlinks differently from > > other > > targets. > > I can see that, now... If I create a soft link to ~/shared/config, > and then cd into the directory, when I type 'ls ..', I get the > listing for ~/shared, not ~/app. Yes, because '..' is a hardlink to the parent directory, and 'cd' does not know how you got to ~/shared/config so it does not know anything about the softlink used to get theere. > > Bummer... > > I've just dug through man ln, and don't see any obvious solution. > Since this must be a problem for anyone who wants to do something > like this, I guess I am taking the wrong approach, altogether. > > Will have to re-think this.... > > > > -- John > -- Erik Trulsson ertr1013@student.uu.se