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 would like to make my documents synchronised across my dual boot Windows 8 and Ubuntu system.

I've chosen to implement this as mounting the Windows data partition in Ubuntu at boot time with fstab, then making symlinks to my documents, pictures etc.

The question is, should I do a soft link (ln -s ~/Documents /mnt/data/.../Documents) or a hard link (ln ~/Documents /mnt/data/.../Documents)? I really can't decide!

share|improve this question
Hard links don't even work! Linux will not allow you to make cross-drive hard links. – CJxD Mar 18 '13 at 23:05
up vote 1 down vote accepted

Use a soft link, it is safer and I am not even sure that Windows can deal with Linux hard links, I don't know how NTFS deals with hard links.

However, do it the other way around. You want to link your Windows documents to your Linux $HOME:

  1. First make sure that /mnt/data/.../Documents is up to date by copying any newer files from ~/Documents:

    cp -ruv ~/Documents/* /mnt/data/.../Documents
  2. Then delete the ~/Documents directory (make sure the step above worked first) and create the link:

    rm -r ~/Documents 
    ln -s /mnt/data/.../Documents ~/Documents 

That way Linux will simply treat the /mnt/data/.../Documents directory as its ~/Documents. The whole process is transparent to Windows so you don't need to worry about file system compatibility issues.

share|improve this answer
Perfect! Yeah, I messed up my ln syntax, but that is what I meant! I went one further (as most directories have the same name Ubuntu <=> Windows) and removed my whole user directory, then linked it back again to my Windows user directory. Works great! – CJxD Mar 18 '13 at 23:09
Woah! You now have a $HOME directory that is in NTFS format? This is not a good idea! You also just lost ALL your settings (directories and files starting with . that are not visible by default). If you have a backup I really really recommend that you switch back. If you want to, you can link specific directories as described in my answer but don't do the entire $HOME. – terdon Mar 18 '13 at 23:31

You must log in to answer this question.

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