Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Feb 2005 16:05:00 -0500
From:      Chet Ramey <chet@caleb.ins.cwru.edu>
To:        vova@fbsd.ru
Cc:        andreas.kohn@gmx.net
Subject:   Re: cd into // works?
Message-ID:  <050222210500.AA14687.SM@caleb.ins.cwru.edu>
In-Reply-To: Message from vova@fbsd.ru of Tue, 22 Feb 2005 23:44:48 %2B0300 (id <1109105088.1274.2.camel@localhost>)
References:  <1109103592.84939.11.camel@klamath.syndrom23.de> <1109105088.1274.2.camel@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
> >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/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?050222210500.AA14687.SM>