Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a drive mounted at /media/ that contains a directory with a space in the name - let's call it "My Stuff".

I would like to bind mount it to "My Stuff" in my home directory. I tried the following in fstab, but all attempts to mount resulted in a syntax error:

/media/My\ Stuff /home/me/My\ Stuff none bind
"/media/My\ Stuff" "/home/me/My\ Stuff" none bind
"/media/My Stuff" "/home/me/My Stuff" none bind

Is there a way to do this?

share|improve this question

You need to replace every occurence of space within the directory path by \040 in your fstab file.

So try :

/media/My\040Stuff /home/me/My\040Stuff none bind 0 0
share|improve this answer
    
You may need to first create the /home/me/My\ Stuff directory – Olivier Dulac Dec 19 '12 at 4:11

mount --bind /media/My\ Stuff /home/me/My\ Stuff

run as root or use sudo

share|improve this answer
    
I suspect the user knew that because of the examples they gave that didn't work, but wants a line that will function in fstab not just from the command-line. – mikebabcock Dec 19 '12 at 3:28
    
Right. I want this permanent. – chris Dec 19 '12 at 3:29
    
Try:"/media/My Stuff" "/home/me/My Stuff" bind 0 0 or you may need the '\ ', but drop the none before bind – user168261 Dec 19 '12 at 3:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .