Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Avoid duplicates when copying music from another PC UNIX
I am sure some of you have had this issue before if you use more than one platform at home. Personally for me, OS X and iTunes lack some audio features I like so I don't do my audio ripping from my personal CD collection on a Mac. I do it on my windows/Linux box so I can take advantage of some good open source formats like OGG, FLAC, and MP3vbr (though I think the newest release of itunes will support VBR? not sure). [Editor: iTunes has had VBR support for quite a while.] However, I like to have my music collection on my Mac so I can listen to my music when I am working on it, and my laptop is a Macbook Pro.

I am sure a lot of you already know this, and this is nothing new or exciting, but I have used basic Unix commands to copy my music directory from my PC to my Mac using rsync, and have not had it copy over any duplicate albums. For example, I have about 40GB of music ripped to my PC of my own personal collection. When I copy it via SMB over the network, it duplicates about every five albums or so which is annoying. To get around this I simply used rsync instead. Make sure all the proper permissions are in place, so you can mount your share from Windows or Linux box on your mac. Connect to the share and mount it. Once it's mounted, use this very simple command:
rsync -r -u /path/to/your/music /destination/on/your/mac
You can use this over and over again -- the -u tag should only copy new material from your other computer and not copy what has already been copied. I have been using this method for about a month now, since I rip everything in FLAC then convert it to MP3 and then copy it to my Mac via Terminal. So far no more duplicate albums are being copied using this method.

Also since you can simply drag and drop the file paths directly into Terminal, it makes it even easier. If you were so inclined, you could make a shell script doing this with a cron job so it auto-updates once a week or whatever. This method could be applied from Mac to Mac as well, but if your Macs are networked, you could just share it over AirTunes or what not.
  • Currently 3.33 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (3 votes cast)

Avoid duplicates when copying music from another PC | 5 comments | Create New Account
Click here to return to the 'Avoid duplicates when copying music from another PC' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Avoid duplicates when copying music from another PC
Authored by: ataraxia on Jul 27, '07 07:46:06AM
This can also be done with rsync over ssh:

rsync -avE -e ssh --delete remote_machine:/path/to/remote/music /path/containing/local/music/folder
Since ssh servers are more common on Linux machines than SMB or AFP, I find this very convenient. I use this to backup all my stuff from one Mac to another, too.

[ Reply to This | # ]
Avoid duplicates when copying music from another PC
Authored by: peragrin on Jul 27, '07 11:35:43AM
two things to help, at least when you have itunes on a mac.

Not in any playlist. -- it shows you which tracks aren't in any of your playlists. great for when you are compiling a bunch of tracks and forget a few.

Corral iTunes dupes -- shows which of your tracks are duplicated by creating a seperate playlist for them

he has other scripts that just make itunes on a mac easier to use.

From his scripts I cobbled together an Itunes control script that runs in terminal. I can remote control my music quickly and easily with simple terminal commands.

I thought once I was found but it was only a dream

[ Reply to This | # ]

Avoid duplicates when copying music from another PC
Authored by: n1mie on Jul 27, '07 04:32:32PM

Another great hint. I'm doing a sync right now between my two main machines. Only down side is my laptop is working so hard that it's become a major heat source.


[ Reply to This | # ]
Avoid duplicates when copying music from another PC
Authored by: flammable on Aug 05, '07 10:22:53PM
Just rip using Max. No need for the PC.

[ Reply to This | # ]
Authored by: zman on Jan 31, '08 01:04:20AM
rsync -avE -e ssh --delete remote_machine:/path/to/remote/music /path/containing/local/music/folder
makes the "to" folder exactly the same as the "from" folder. this is fine for backups but usually you want to merge your music. so to merge in only one direction you could

use the -u option (update) and
leave the --delete away

You may want to make a
testrun (using -n) before you snivel afterwards. and type just type
rsync to see what the options are doing

[ Reply to This | # ]