Home » Questions » Computers [ Ask a new question ]

What is directory "//"?

What is directory "//"?

On various linux machines you can

Asked by: Guest | Views: 52
Total answers/comments: 1
Guest [Entry]

"Let's ask the man himself (Chester Ramey):

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