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?

  • 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 9 '13 at 18:29
  • 1
    Why should you have two copies then? I don't get it. – Hauke Laging May 9 '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 9 '13 at 19:36
  • @HaukeLaging Dropbox doesn't like symlinks. It immediately converts them to copies. – derobert May 9 '13 at 19:40

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.

  • This worked perfectly. – Corey Helton May 9 '13 at 21:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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