Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

2 Answers

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
add comment

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.