Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use the following commands to change directory and it generally works fine.

[max@localhost max]$ cd /
[max@localhost /]$ cd /home/max/
[max@localhost max]$ pwd

But today, by mistake, I entered two // instead of one / and to my surprise, it works as well. So, I tried with various examples and all of them works just fine without giving any sort of an error.

[max@localhost /]$ cd /home///////////////max/////////////////////
[max@localhost max]$ pwd
[max@localhost max]$ cd /
[max@localhost /]$ cd /////////////////home/max///////////
[max@localhost max]$ pwd

What does these forward slashes mean (/ and ///////) and what do they do and represent?

share|improve this question

It's defined by IEEE standards:

A pathname may optionally contain one or more trailing slashes. Multiple successive slashes are considered to be the same as one slash.

There is actually a similar question and the solution is described there: How Linux handles multiple path separators.

share|improve this answer
It simplifies combining paths by allowing you to avoid testing for leading or trailing slashes. You can just do path1 + "/" + path2 and it will work whether or not path1 has a trailing slash and/or path2 has a leading slash. – David Schwartz Aug 9 '12 at 13:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.