From owner-freebsd-questions@FreeBSD.ORG Mon Mar 16 16:06:21 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 271B31065674 for ; Mon, 16 Mar 2009 16:06:21 +0000 (UTC) (envelope-from jalmberg@identry.com) Received: from mx1.identry.com (on.identry.com [66.111.0.194]) by mx1.freebsd.org (Postfix) with ESMTP id B11DF8FC1A for ; Mon, 16 Mar 2009 16:06:20 +0000 (UTC) (envelope-from jalmberg@identry.com) Received: (qmail 55651 invoked by uid 89); 16 Mar 2009 16:06:43 -0000 Received: from unknown (HELO ?192.168.1.110?) (jalmberg@75.127.142.66) by mx1.identry.com with ESMTPA; 16 Mar 2009 16:06:41 -0000 In-Reply-To: <33BEAB1A-A0AB-4684-95EE-8C2C4328ABA7@identry.com> References: <20090316153923.GA13043@owl.midgard.homeip.net> <33BEAB1A-A0AB-4684-95EE-8C2C4328ABA7@identry.com> Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <281DCAD1-CA1B-4D07-9A9B-DCA4C2F41A7F@identry.com> Content-Transfer-Encoding: 7bit From: John Almberg Date: Mon, 16 Mar 2009 12:06:17 -0400 To: John Almberg X-Mailer: Apple Mail (2.753.1) 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:06:21 -0000 On Mar 16, 2009, at 11:47 AM, 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. > > 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.... > > Okay! I guess I wasn't the first to have this problem... lndir (in ports) solves the problem by creating a set of soft links for all the files in the 'linked' directory. Kinda kludgy, but it works. -- John