Joined July 2012
·

Stefan Imhoff

Frontend Engineer at XING AG
·
Hamburg, Germany
·
·
·

This isn’t really programming, just using the shell. You need some basic skills, like how to navigate the terminal, creating files, editing files. There are some GUI-Tools like Lingon (http://www.peterborgapps.com/lingon/) to create LaunchDeamons, but you need at least to know how to execute a command. The file above is just a pure text file in the XML format. The ending is .plist, an Apple format for PropertyLists.

You could just execute the command in this file manually in the Terminal. All the deamon does is starting a service which triggers this script every time something in iTunes changes (there is a settings file in this folder, which gets written, when something changes):

/usr/bin/rsync --recursive --ignore-existing --compress --delete /Users/your-user-name/Music/iTunes/ /Volumes/your-external-hd-name/iTunes/

This uses rsync (a unix tool for syncing files), coping all folders recursive, only new ones, compressing it during transfer for speed and deleting files/folders not existing any more. It copies your iTunes library folder to the external harddrive to a folder "iTunes".

For automounting you could use AppleScript, just google and you will find a lot of scripts on StackOverflow or somewhere else.

Achievements
243 Karma
8,100 Total ProTip Views