4

I'm trying to get dropbox symlinked to the relevant folders in /home. I'd like to symlink them like this:

~/Dropbox/Pictures --> ~/Pictures

~/Dropbox/Camera Uploads --> ~/Pictures/Camera Uploads

If I do that it will work but I'll have two copies of my pictures and videos stored on Dropbox. I don't want to waste space.

Any ideas on how to solve this problem?

MattDMo
  • 2,314
  • 3
  • 19
  • 28
  • 1
    Why not just move your `~/Dropbox/Camera Uploads` folder to `~/Dropbox/Pictures`? Problem solved, no wasted space, no messing with symlinks inside symlinked directories. – MattDMo May 09 '13 at 18:29
  • 1
    Why should you have two copies then? I don't get it. – Hauke Laging May 09 '13 at 18:29
  • @MattDMo I believe Camera Uploads is a special folder in Dropbox (used by the e.g., Android app), I'm not sure you can move it... – derobert May 09 '13 at 19:36
  • @HaukeLaging Dropbox doesn't like symlinks. It immediately converts them to copies. – derobert May 09 '13 at 19:40

1 Answers1

4

Assuming you have root on the system, you can use a bind mount. Note that this will leave you with an empty Camera Uploads directory in your ~/Dropbox/Pictures, but avoiding that adds much more complexity (unionfs of some sort).

# mount --bind ~user/Dropbox/Pictures ~user/Pictures
# mkdir -p ~user/Pictures/Camera\ Uploads
# mount --bind ~user/Dropbox/Camera\ Uploads ~user/Pictures/Camera\ Uploads

You can put these bind mounts in /etc/fstab or run them through sudo, of course.

derobert
  • 107,579
  • 20
  • 231
  • 279