At home I have a laptop, and at work a desktop. I usually surf and do email and load music on my laptop (either iTunes store, or from CDs), but occasionally I'll shop the iTunes store at work. This means that, if I want to sync my songs to each machine, I can't simply copy my laptop's iTunes directory from the laptop to the desktop, since I'd lose some purchases. The process I use involves four steps, so it's not the simplest, but it works well...
Before starting, you must be able to ssh from either machine to the other, so the keys are set up and rsync can use ssh. Then I rsync from the laptop to the desktop, then the desktop to the laptop. If files are copied to the desktop, I run iTunes on that machine and choose "Add to Library" on the iTunes directory, which scans the entire iTunes directory and adds the new songs to iTune's library. Similarly on the laptop.
The rsync command, which is a single line is:
rsync --ignore-existing --progress --recursive --perms --times \
--size-only --whole-file --rsh=ssh --exclude='.*' \
--dry-run Music/iTunes/ DesktopMachine.local:Music/iTunes
The dry-run argument is to test and make sure everything is setup properly before attempting it. If it seems to be doing what you want, eliminate the dry-run argument and let it go. From the desktop machine, I'd rsync to LaptopMachine instead -- use the appropriate system names, of course.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20040927151426616