Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

I already RTFMed and googled but I can't come up with a proper solution so I hope you guys could help me. This is the script I use:

rsync -azluPhmt --progress --link-dest=./iTunes ./iTunes/Users/admin/Box.com/iTunes --delete-during --exclude="*Album Artwork*"
share|improve this question
    
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
    
Note that -P makes --progress redundant. –  jw013 Aug 24 '12 at 13:36
add comment

1 Answer

up vote 2 down vote accepted

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" …
share|improve this answer
    
yes, exactly, thanks. –  Asmodiel Aug 25 '12 at 19:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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