P
P
partisan422019-04-23 06:44:14
linux
partisan42, 2019-04-23 06:44:14

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

[[+comments_count]] answer(s)
F
Fixid, 2019-04-23
@partisan42

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* ? [ ] # ~ = %

R
Radjah, 2019-04-23
@Radjah

To mount cifs, the path can be specified as //host/share.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question