From owner-freebsd-current@FreeBSD.ORG Tue Feb 22 21:12:44 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 9CBD916A4CE for ; Tue, 22 Feb 2005 21:12:44 +0000 (GMT) Received: from mirapoint1.tis.cwru.edu (mirapoint1.TIS.CWRU.Edu [129.22.104.46]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1D84243D48 for ; Tue, 22 Feb 2005 21:12:44 +0000 (GMT) (envelope-from chet@caleb.ins.cwru.edu) Received: from caleb.ins.cwru.edu (caleb.INS.CWRU.Edu [129.22.8.211]) by mirapoint1.tis.cwru.edu (MOS 3.5.4-GR) with SMTP id EAM51656; Tue, 22 Feb 2005 16:12:32 -0500 (EST) Date: Tue, 22 Feb 2005 16:05:00 -0500 From: Chet Ramey To: vova@fbsd.ru References: <1109103592.84939.11.camel@klamath.syndrom23.de> <1109105088.1274.2.camel@localhost> In-Reply-To: Message from vova@fbsd.ru of Tue, 22 Feb 2005 23:44:48 +0300 (id <1109105088.1274.2.camel@localhost>) Message-ID: <050222210500.AA14687.SM@caleb.ins.cwru.edu> Read-Receipt-To: chet.ramey@case.edu MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailman-Approved-At: Wed, 23 Feb 2005 12:57:09 +0000 cc: freebsd-current@freebsd.org cc: andreas.kohn@gmx.net Subject: Re: cd into // works? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: chet.ramey@case.edu List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Feb 2005 21:12:44 -0000 > >due to a typo, I typed > > > >[klamath] ~>cd // > > > >today. Okay, I'm used to the shell[1] changing any // into /, so I > >expected to get to /. Now, I got there, but pwd/$PWD still have "//" in > >them? This is from the bash FAQ: E10) Why does `cd //' leave $PWD as `//'? POSIX.2, in its description of `cd', says that *three* or more leading slashes may be replaced with a single slash when canonicalizing the current working directory. This is, I presume, for historical compatibility. Certain versions of Unix, and early network file systems, used paths of the form //hostname/path to access `path' on server `hostname'. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ( ``Discere est Dolere'' -- chet ) Live...Laugh...Love Chet Ramey, ITS, CWRU chet@case.edu http://tiswww.tis.cwru.edu/~chet/