Re: cd into // works?

From: Willem Jan Withagen <wjw_at_withagen.nl>
Date: Wed, 23 Feb 2005 22:38:00 +0100
Julian H. Stacey wrote:
> Chet Ramey wrote:
> 
>>>>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'.
> 
> 
> I recall PCS Cadmus supported eg /../other_hostname/usr/other_person (on 
> Unix Graphics workstations with proprietary networking extension).

Dare I say Apollo Domain? Which was my first introduction into what was 
almost Unix.....

/ went to the root of the file system of the workstation you're on
// made you go anywhere on the tokenring you wanted.

There where a lot of packages that where ported from "real Unix" that 
did not quite cope with this concept.

Sadly Apollo Domain and OS died when they got aquired by HP. It was a 
lot of fun working on them.

--WjW
Received on Wed Feb 23 2005 - 20:37:45 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:29 UTC