How do symbolic links work in Dropbox?
I made some links to files in a folder. When I added that folder to Dropbox, the links contained duplicate copies of the files linked to. Have you had this problem? Do you understand what is happening? Is there a solution?
To make this question clearer: In the "type" column of the file manager, before connecting to Dropbox, Link_to_notes was shown to be a link and the size was 32 bytes. After connecting to Dropbox, Link_to_notes was shown to be a plain text document and the size was 18.7 kB, the size of the notes file.
DropBox follows symbolic links and treats them as directories. It's really useful for backing up without having to move files and directories into your DropBox directory.
$ ln -s ~/Documents/ ~/Dropbox/Documents
or store the files in DropBox and create a symbolic link in the opposite direction
$ ln -s ~/Dropbox/Documents/ ~/Documents
The best way to do it is to store the files in the dropbox folder and symlink to them from outside...
So create ~/Dropbox/Documents and symlink:
ln -s ~/Dropbox/Documents ~/Documents
This stops dropbox getting confused and de-linking anything that is a link inside because you have all the things inside and instead when you want them elsewhere you link to them in dropbox. The basic rule is don't have any symlinks anywhere inside the dropbox folder...have them outside the dropbox folder and you'll have no problem.
I have dropbox on several ubuntu machines and have all my major top level folders actually stored in dropbox.