Linked Questions
13 questions linked to/from unix, difference between path starting with '/' and '//'
152
votes
6
answers
31k
views
How does Linux handle multiple consecutive path separators (/home////username///file)?
I'm working on a python script that passes file locations to an scp subprocess. That's all fine, but I'm in a situation where I may end up concatenating a path with a filename such that there's a ...
4
votes
1
answer
251
views
Why can I cd to // but not /// or //// or ///// or … [duplicate]
When I change directory to //, it seems to put me in a special directory that is very similar to but slightly different to /. However, trying to add any further slashes (///) simply drops me in /.
$ ...
0
votes
1
answer
168
views
Difference between `/` and `//` directories [duplicate]
Due to a typo, I accidentally cd into //. Which turns out to be a real directory (but same content as /)
So what is the difference between / and // (despite having identical content)
Real example: (...
1
vote
0
answers
130
views
Why does cd // work? [duplicate]
Possible Duplicate:
unix, difference between path starting with '/' and '//'
On my Mac OS X Lion box, with Bash:
$ cd //
$ pwd
//
$ ls
Applications System cores ...
2
votes
0
answers
116
views
"cd //" and "cd /" what is the difference? [duplicate]
Possible Duplicate:
unix, difference between path starting with '/' and '//'
If I make a cd // followed by a pwd I see:
# cd //
# pwd
//
why is that? what's the differece with:
...
-1
votes
1
answer
75
views
What's the difference between the pile paths '/' and '//'? [duplicate]
I noticed in Ubuntu that the following commands go to seemingly different locations in the file system, but the locations have the same files:
cd /
cd //
ls-ing from both locations produces the same ...
2
votes
1
answer
150
views
Why does cd-ing to // set PWD to //, but more slashes just gives /? [duplicate]
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 ...
0
votes
2
answers
80
views
What is the meaning of the directory specified by '//'? [duplicate]
What is the meaning of the directory specified by '//'?
It can be accessed by typing in 'cd //' at the comand prompt.
I have tried this on mac 10.9.5 and Centos 6. It shows the contents for the ...
0
votes
0
answers
73
views
What directory is // [duplicate]
$ cd /
/$ ls
bin dev home initrd.img.old lib64 media opt root sbin sys usr vmlinuz
boot etc initrd.img lib lost+found mnt proc run srv tmp var vmlinuz....
127
votes
9
answers
13k
views
On what systems is //foo/bar different from /foo/bar?
Throughout the POSIX specification, there's provision (1, 2, 3...) to allow implementations to treat a path starting with two / specially.
A POSIX application (an application written to the POSIX ...
18
votes
2
answers
8k
views
Strange difference between pwd and /bin/pwd
I added a symlink to the current directory with ln -s . aa. If I execute cd aa, and after that I executed pwd, the response is /home/sim/aa.
But if I execute /bin/pwd it prints /home/sim (the current ...
17
votes
3
answers
10k
views
Should I use a slash at the end of path variables in shell script or not? [closed]
Today when writing my shell script.
A question suddenly comes to my mind.
Since cd /target_dir and cd /target_dir/ both works.
Should I add a slash at the end of my path variables in a shell script?
...
2
votes
1
answer
355
views
Unreadable backup directory on a USB drive
I was editing a script I wrote some time ago to automatically backup the contents of my Raspberry Pi SD card, and in the course of editing, I missed a "/", and so here is the entire shell script:
#!/...