quick easy *nix question

dabuddha

Lifer
Apr 10, 2000
19,579
17
81
Just want to confirm this but does an extra "/" in directory names have any effect?

such as:

cd //etc/

ll //root

TIA :)
 

Cogman

Lifer
Sep 19, 2000
10,284
138
106
hmm, I didn't even think that was correct syntax. No, I don't believe it changes anything other then the way the directory is displayed (I could be wrong though)
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Not as far as I can tell but bash might be cleaning it up for me, / isn't a valid character in filenames so there's no chance of you needing to use it for anything except directory separators.

I just wrote a quick C program to test it and it worked with /tmp//////somefile too so I don't think it matters at all.
 

lousydood

Member
Aug 1, 2005
158
0
0
No. // is considered to be the same as /. This decision was made to simplify shell scripts a bit.