2

On my ubuntu box I accidentally just did cd // and noticed that my current path changed to //. ls showed the contents of my root directory.

When I try cd /// (or any other number of slashes) I'm just taken directly to the root.

I'm sure this isn't something I need to worry about in any way during every day life but I was wondering if there was some interesting curiosity about why it behaves this way.

Mingye Wang
  • 1,181

1 Answers1

-1

cd / means change directory to root. The amount of slashes does not make a difference.

(source): http://www.linfo.org/cd.html

  • 1
    If you think a question is in the wrong place, just flag it for migration. – EEAA Oct 28 '15 at 16:32
  • (1) Your source doesn’t support your answer; it says what cd / means (which we *all* already know) but doesn’t say anything about cd // or multiple slashes.  (2) Something it does say is “When used without specifying any directory name, cd returns the user to the previous current directory.” — which, of course, is wrong — so it’s not a very trustworthy source. – G-Man Says 'Reinstate Monica' Oct 31 '15 at 04:35