Double root folder vs single root folder

On my Linux box, in bash, I have access to a "double root" folder denoted by two forward slashes:

tomas:~ $ cd /
tomas:/ $ ls
bin/ cdrom@ ...
tomas:/ $ cd //
tomas:// $ ls 
bin/ cdrom@ ...

The content of the folder and its subfolder is identical to the "normal" single slash root. The double slash does not go away when I access its subfolders. The annomaly does not repeat itself with three or more slashes; these are simple synonyms for the root:

tomas:// $ cd home/tomas
tomas://home/tomas $ cd ///
tomas:/ $ cd ////
tomas:/ $

What kindof place is it? Is it a bug? Can anyone explain the annomaly?


From Bash FAQ E10:

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'.


"It's not a bug, it's a feature!"

You're still in the same root directory. I don't know the origins of this, but suspect it may have something to do with building strings for absolute paths. If anyone else knows for sure, pipe up.