Skip to content

iPod Command-Line Sync on Mac OS X

This will sync any attached iPods if iTunes is running:

osascript <<_END_OF_UPDATE
tell application "Finder"
        set processList to get name of every process
        if processList contains "iTunes" then
                tell application "iTunes" to update (every source whose kind is iPod)
        end if
end tell

It can be called from a cronjob to keep an iPod updated. iTunes ought to just do this automatically.