Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to let Dropbox treat symbolic link AS IT IS? [closed]

If I create a symlink inside Dropbox folder, pointing to another file also inside Dropbox folder (say, to maintain certain directory stucture), then Dropbox will try to de-reference the symlink and treat it as an normal file, instead of syncing it as a symlink. This could be very frustrating sometimes since I don't want to copies of the same file.

So my question is, is that a way to let Dropbox sync symbolic link just AS IT IS?

like image 269
Jinghao Shi Avatar asked Mar 06 '13 18:03

Jinghao Shi


People also ask

Does Dropbox work with symbolic links?

Symlinks (symbolic links), aliases, shortcuts, junction points, resource forks, and networked folders can be used in the Dropbox folder on your computer to reference other files in the Dropbox folder on your computer.

What happens to symbolic link when file is deleted?

If a symbolic link is deleted, its target remains unaffected. If a symbolic link points to a target, and sometime later that target is moved, renamed or deleted, the symbolic link is not automatically updated or deleted, but continues to exist and still points to the old target, now a non-existing location or file.

How do I manage a symbolic link?

To remove a symbolic link, use either the rm or unlink command followed by the name of the symlink as an argument. When removing a symbolic link that points to a directory do not append a trailing slash to the symlink name.

How do you overwrite a symbolic link?

Overwriting Symlinks If you try to create a symbolic link that already exists , the ln command will print an error message. To overwrite the destination path of the symlink, use the -f ( --force ) option.


2 Answers

In the cloud the directory structure is not the same as in your computer. Therefore there is no way it will synchronize the symbolic link as it is.

In your computer, the link points to the absolute path to your original file (or folder). It looks like the following:

Original folder path: /Users/username/home/Documents/Dropbox/MyFolder/ Symbolic link: symlink -> /Users/username/home/Documents/Dropbox/MyFolder/ 

Since the cloud can't point to this same directory structure it will de-reference it and copy your files (on the cloud) all over again.

Links are great in Dropbox when it points to something outside your dropbox folder. This way the outside files will be copied to the cloud but wont be copied in your computer.

UPDATE: On the matter of relative symbolic links, I guess Dropbox can't sync as it is because your dropbox directory structure may be different from your colleagues.

For example:

       Your structure:   Dropbox/Projects/                              - coolfile.txt                            - SharedDirectory/  Your friend structure:   Dropbox/SharedDirectory/  Relative Symbolic link inside SharedDirectory:  link -> ../coolfile.txt 

The link will work your structure but not on your friends.

UPDATE2: links inside Dropbox are also being used to share content from within a shared folder with someone outside that group.

like image 130
gibertoni Avatar answered Sep 18 '22 22:09

gibertoni


I've tried doing what you are trying to do. No luck. At the moment there is no way to get dropbox to sync symlinks properly. However, there is a feature request exactly about this. So cast your votes on the request and hope for the best.

like image 30
trailmax Avatar answered Sep 19 '22 22:09

trailmax