From: jidanni on
Gentlemen, what is the significance of double slashes in paths?
I know you can use as many as you want,
$ ls -s /usr/lib/xorg/modules////////libxaa.so
372 /usr/lib/xorg/modules////////libxaa.so
but one is enough, and two usually mean one did
$ a=/usr/; echo $a/doc
/usr//doc
when a=/usr would have been fine.

In http://bugs.debian.org/487468

>> $ grep -c // /var/log/Xorg.0.log
>> 22
>> 21 of which are unsightly double slashes in paths. Please use only
>> single slashes, else looks sloppy.
>>

BG> If you don't know what // means in a path, you're not smart enough to
BG> look at a Xserver log. Fixing this is completely useless.

Is he using double slashes as some special insider code as for when
one thing ends and another begins? What does he mean?
From: Dan Stromberg on

Usually a double / just refers back to the "current" directory - EG /a//b
starts at root, looks up a, looks up a again, and looks up b.

A trailing slash can be useful for unambiguously specifying that you want
a directory, not a regular file.

Some applications will give a double slash or trailing slash a special
meaning. Examples that come to mind are /etc/passwd (the login suite
being an application in a very weak sense :), rsync, samba, URL's in
general (EG http stuff), and... I've
never used AFS, but does it have a special meaning for double / too?

On Mon, 23 Jun 2008 21:31:28 +0000, jidanni wrote:

> Gentlemen, what is the significance of double slashes in paths? I know
> you can use as many as you want, $ ls -s
> /usr/lib/xorg/modules////////libxaa.so 372
> /usr/lib/xorg/modules////////libxaa.so but one is enough, and two
> usually mean one did $ a=/usr/; echo $a/doc
> /usr//doc
> when a=/usr would have been fine.
>
> In http://bugs.debian.org/487468
>
>>> $ grep -c // /var/log/Xorg.0.log
>>> 22
>>> 21 of which are unsightly double slashes in paths. Please use only
>>> single slashes, else looks sloppy.
>>>
>>>
> BG> If you don't know what // means in a path, you're not smart enough
> to BG> look at a Xserver log. Fixing this is completely useless.
>
> Is he using double slashes as some special insider code as for when one
> thing ends and another begins? What does he mean?

From: John DuBois on
In article <52%7k.11072$N87.159(a)nlpi068.nbdc.sbc.com>,
Dan Stromberg <dstromberglists(a)gmail.com> wrote:
>Some applications will give a double slash or trailing slash a special
>meaning. Examples that come to mind are /etc/passwd (the login suite being an
>application in a very weak sense :), rsync, samba, URL's in general (EG http
>stuff), and... I've never used AFS, but does it have a special meaning for
>double / too?

xenixnet (80's networking system that included network filesystems) used
//hostname/path to refer to path on hostname; *any* path that began with // was
interpreted that way. Which did cause pain when you referenced a path that was
supposed to be local but began with a double slash, which is easy to end up
with when concatenating path elements. The reference was liable to hang for a
long time while the local host attempted to look up the host "usr" or some
such.

Also, along similar lines - wuftpd gives special meaning to /./ if it occurs in
certain users' home directory specifications.

John
--
John DuBois spcecdt(a)armory.com KC6QKZ/AE http://www.armory.com/~spcecdt/