I've tried setting up a script to hardlink my files to my box.com account (as it's a backup of my music library). As I want to run it automatically to sync my music across several devices, I wanted to use rsync as I'm on Mac OS X 10.7.4 (if anyone cares).

The script I came up with however only copies the files instead of hardlinking them (the available disc space lowers when I start the script). What I'm trying to achieve is the box.com app syncing something outside its actual folder.

This is the script I use:

rsync -azluPhmt --progress --link-dest=./iTunes ./iTunes/Users/admin/Box.com/iTunes --delete-during --exclude="*Album Artwork*"
  • Oh, I just had to use absolute paths. now this one works: rsync -azluPhmt --progress --link-dest=/Users/admin/Music/iTunes /Users/admin/Music/iTunes/ /Users/admin/Box.com/iTunes --delete-during --exclude="*Album Artwork*" – Asmodiel Aug 24 '12 at 10:55
  • 1
    Note that -P makes --progress redundant. – jw013 Aug 24 '12 at 13:36

According to the rsync man page section for --link-dest=DIR,

If DIR is a relative path, it is relative to the destination directory.

I am guessing that you assumed it would be relative to the current working directory. You probably meant to write:

rsync -azluPhmt --progress --link-dest="$PWD/iTunes" …
| improve this answer | |

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.