[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ls and root directory indicator

From: Bob Proulx
Subject: Re: ls and root directory indicator
Date: Mon, 25 Feb 2013 13:32:38 -0700
User-agent: Mutt/1.5.21 (2010-09-15)

Sami Kerola wrote:
> Secondly,pardon my ignorance, I thought '/' and '//' or how ever many
> slashes are the same root. Is this some non-obvious portability
> gotcha? A link to education material would be great.

Correct.  Anywhere except in the leading position the number of '/'
characters is not significant.  In the leading position if there are
exactly two leading slash characters "//" then it is an implementation
defined behavior.  It may specify a network path.

This behavior is a legacy system behavior.  In the old days Apollo
Computer produced the Aegis Domain/OS system.  On that system paths
were "//hostname/path/on/that/system".  Therefore use of "//something"
was not portable and could be indicating a networked path.

As a pre-existing condition this was standardized by POSIX to allow
either behavior.  Because both behaviors were in common use.  See the
Pathname Resolution section where it describes this in some detail.

Cygwin needed a similar construct.  Because the above was already
standardized it was also available in Cygwin.  Therefore Cygwin also
uses this syntax too.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]