Monday, January 14, 2013

How to mount smb share directory with space and ampersand

<CentOS>
How to mount smb share directory with space and ampersand


Tested on Centos 5.7, the following command works by escaping the special character using \ (backslash)

space  -> \(space)
ampersand (&) -> \&

E.g. For a smb share with the name "My Documents & Musics"

\\<Server IP>\My\ Documents\ \&\ Musics

*Take note that there is a space after the backlashes after "My", "..nts" and before "Music.."


There a some posts states that the space should be escaped with ascii code (\040) and ampersand with (\046)

I have tested but it does not work on my CentOS 5.7 instance.