LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Mount a Windows path (https://www.linuxquestions.org/questions/linux-server-73/mount-a-windows-path-853051/)

grob115 12-29-2010 10:46 AM

Mount a Windows path
 
Am trying to do a mount of a Windows folder onto Linux. The path has some spaces in it like //hostname/path 1/path 2/path 3. Anyone know how I should handle this?

bicpen 12-29-2010 11:01 AM

You can use an 'escape' character in the string
for example:

//hostname/path\ to\ folder/one/two/three\ and\ four


before each space i've put a slash, this is an escape character.

TobiSGD 12-29-2010 11:16 AM

You can't mount folders, only partitions and filesystem-containers, such as .iso-files, can be mounted.

grob115 12-29-2010 11:19 AM

Tried that but it doesn't work and was given an error. Also tried as per the instructions on this website using \40. This returned the command entered 3 times. When I then check using "df -k" I can see the mount path but only the section up till the first "\".

TobiSGD 12-29-2010 11:32 AM

Please post the commands you are using and the error messages you get.

michaelk 12-29-2010 12:56 PM

As stated you can only mount using the name of the share you created on the windows computer. You can not mount subdirectories.

like:
mount -t cifs "//hostname/share name" /media/windowshare

bicpen 12-30-2010 06:10 AM

Quote:

Originally Posted by TobiSGD (Post 4206780)
You can't mount folders, only partitions and filesystem-containers, such as .iso-files, can be mounted.

i guess i should have been more specific :P

The whole escape char thing can be used in other paths too, i.e. if you have spaces in a local path.


this page: http://www.cyberciti.biz/tips/how-to...der-linux.html

gives some examples of some of the options you can use for a cifs/smb mount in linux

can you describe the error you receive ?


All times are GMT -5. The time now is 10:37 PM.