Answer the question
In order to leave comments, you need to log in
Why do I need a double slash when mounting Windows shares?
Good day.
I understand that the question is stupid, and in principle I have already found the answer myself, but I am wildly interested in why it is so, and not otherwise? I hope your answer will help me better understand how nix systems work.
There is a share on Win2012
I want to mount it on a CentOS7 machine.
I do this
[[email protected] ~]# mount.cifs \\10.10.10.12\distr /var/www/html/owncloud/data/serveit/files -o user=distr,domain=10.10.10.12,pass=
pass I get
mount.cifs: bad UNC (\10.10.10.12distr)
But if I do
[[email protected] ~]# mount.cifs \\\\10.10.10.12\\distr /var/www/html/owncloud/data/serveit/ files -o user=distr,domain=10.10.10.12,pass=pass
then everything clings perfectly.
Poke your finger where to read in order to understand why a double slash is needed, and in what cases is it still used?
Thank you very much in advance:)
Answer the question
In order to leave comments, you need to log in
On unix, escape with \
. So the view entry \\
means one \
in "safe text" form.
But each character must be escaped separately, so \\\\ = \\
In the general case, escaping is required | & ; < > ( ) $ ` \ " ' пробел и перевод строки
and* ? [ ] # ~ = %
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question