Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

Can's get a window's directory to mount due to an apostrophe. The relevant bit of fstab:

# Auto-mount windows drive
UUID=0C1C51021C50E86A /media/windows ntfs defaults 0 0

# Auto-mount the Music folder
/media/windows/Documents\040and\040Settings/Foo\040Name/My\040Documents/My\040Music/Foo's\040Music /home/foo/Music none bind 0 0

Note that I'm using the \040 to escape spaces, but man ascii doesn't (from what I see) have an escape character for a '. I've tried \047 to no avail


share|improve this question

closed as too localized by fossfreedom Sep 29 '12 at 6:27

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

can you post the output or errors you get when you try mounting that manually as root? sudo mount /home/foo/Music – ImaginaryRobots Sep 26 '12 at 22:15
user flagged that they no longer have this computer - closing this for now. – fossfreedom Sep 29 '12 at 6:27

I've used 047 for apostrophe. It worked.

/home/anwar/Anwar\047s\040Pictures /mnt none bind 0 0

I think, you should check the syntax. The folder in my home is "Anwar's Pictures". It is mounted in /mnt.

Check this page.

Your line should be

/media/windows/Documents\040and\040Settings/Foo\040Name/My\040Documents/My\040Music/Foo\047s\040Music /home/foo/Music none bind 0 
share|improve this answer
Hm. This works properly when doing mount -a, but at boot it does not work. I did modify your command to make the end 0 0 instead of just one 0 – Hamy Sep 27 '12 at 18:19
Any chance you have the exact line you used? I'm wondering if the late option would help here, but I can't find any documentation on it – Hamy Sep 27 '12 at 18:32

Instead of doing this in your fstab file, you can use a symbolic link that will work whenever the windows partition is mounted. You can create that with the following command:

ln -s "/media/windows/Documents and Settings/Foo Name/My Documents/My Music/Foo's Music" /home/foo/Music

Note the double quotes will make the spaces work properly - much simpler than the mount method.

[updated question since using 'bind' as an option with a folder is valid, thanks neon_overload]

share|improve this answer
He's using a mount of type bind which is designed to mount a folder rather than a partition. Nonetheless your suggestion for a symbolic link may still be a useful alternative. – thomasrutter Sep 26 '12 at 4:27
It may be - I'm under the impression that the symbolic link may have issues with the partition being mounted at boot (I've used symbolic links extensively on one partition, but not as much across partitions). If this isn't the case, would it be better in any way to use one approach over the other? – Hamy Sep 26 '12 at 22:12
symbolic links (specified by the "-s" option) can cross partitions, though regular "hard" links would have problems with that. – ImaginaryRobots Sep 26 '12 at 22:17

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