[ale] Quick LInux Quiz

Mike Murphy mike at tyderia.net
Mon Mar 15 18:46:56 EST 2004


sorry, I should have better delineated the quote. This was verbatim from 
the bash faq (ie, not my words) ftp://ftp.cwru.edu/pub/bash/FAQ:

[blockquote:]
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'.
[/blockquote]

I don't personally know what they were referring to here. I was planning 
on asking a couple of the very experienced engineers (unix since the mid 
seventies in one case) around the office that might know better.

Mike


Geoffrey wrote:
> Mike Murphy wrote:
> 
>> the CHANGES included with the source says:
>>
>> "Pathname canonicalization now leaves a leading `//' intact, as 
>> POSIX.1 requires."
>>
>> That's in the release notes for bash-2.01-release.
>>
>> So it seems this was on purpose. In notes for newer releases there are 
>> number of allusions to adjustments to // behavior, so it seems that 
>> maybe this hasn't been a happy feature, but I think its definately a 
>> feature.
>>
>> Looking harder, at the BASH FAQ this time, I see:
>>
>> 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've been around various flavors of Unix and various esoteric Unix 
> networks since 1985 and I've never seen any of them that had such an 
> approach.  Care to elaborate?
> 
> 

-- 

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Mike Murphy
781 Inman Mews Drive Atlanta GA 30307
Landline: 404-653-1070
Mobile: 404-545-6234
Email: mike at tyderia.net
Email Pager: pagemike at tyderia.net
AIM: mmichael453
JDAM: 33:45:14.0584N  84:21:43.038W
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



More information about the Ale mailing list