I learned of a new handy command while at the SF Apple Store getting my laptop fixed (long story). Have you ever been copying a lot of files in the Finder, and left the room to make tea, watch a movie, or go to bed? (Yes, THAT much data?!) only to return and find that it crapped out part way through with some stupid File in Use or File Locked or other somesuch problem? Well, I have. Often. This had led me in the past to do such large copies from the Terminal sudo-style. When I was at the Apple Store, the “Genius” there told me about the command line tool called “ditto”. The description from the man page reads:
In its first form, ditto copies one or more source files or directories to a destination directory. If the destination directory does not exist it will be created before the first source is copied. If the destination directory already exists then the source directories are merged with the previous contents of the destination.
Friggin’ awesome if you ask me. This means when I’m recovering my hard drive to my (very stale) backup, I just use 'sudo ditto src dest' and it merges everything into one nightmarish glob that I’ll never look at again, but at least I know everything between the two is there.
I can also imagine it might be great for merging two iTunes Libraries. Hope this is useful to you!
~Spanky