How to force a copy in Mac OS X when Finder freezes

musicsmall

Soon after getting my shiny new Mac, I wanted to transfer all of my music to the laptop. I have my music stored in a few different places (my work computer, home computer, and iPod), but while the music is identical in all locations, it’s also not in Mac’s favourite format. That is to say, it’s not where iTunes can magically whisk it into its happy bosom. I use Rockbox on my iPod, and both desktop computers have Linux.

Rockbox allows an iPod to essentially be used as any other external storage device, with all the music just sitting in folders; most of my stuff is in FLAC or MP3 format. Upon plugging it in and trying to copy everything over in Finder, however, it just stalled after a while and I had to Force Quit Finder.

So I mounted my Music file over the network from my desktop computer. I got further doing it that way, but eventually an error appeared. Usually it claimed that a file already existed, which is kind of silly since I was copying onto a vanilla Macbook!

Thankfully, Mac OS X is built on a Unix core of terminal goodness, so I went into the Utilities (Go –> Utilities) and opened the Terminal. From here, you can use a command to copy everything from the source location to your destination, forcing it to blow past errors and recreate files when necessary.

To do this, use the following code:

cp -RfXv /root/source/* /Users/username/Music

Of course, you can change the source and destination as necessary. Let me explain the different options used in that line of code.

  • cp is the command for copy in the Terminal.
  • R is for Recursive, and will force the copy command to not only hit folders, but all of the subfolders and items within.
  • f forces the command to copy everything without stopping for errors.
  • X tells cp to overwrite existing files
  • v puts the command into verbose mode, so you’ll see a scrolling list of the files being copied. This way, you can be certain that it’s humming right along.

For my source, I had connected to my Music folder on my desktop using Samba, so it was /Volumes/music. And of course, you’ll need to replace “username” in the target with your own Mac username.

If you have any questions, just leave a comment below. I’ll do what I can to help 🙂

2 thoughts on “How to force a copy in Mac OS X when Finder freezes

  1. followed your direction, but honestly dont know what I am doing. I am just bummed that I cannot transfer 900 GB of music from my WD labtop harddrive to my 2TB WD harddrive. I keep getting the same error you identified. There has to be a better way.

    1. Hmm…. I wonder if booting to a Linux live disc and using that to copy would work better. That way OS X isn’t locking any resources, and you’ll have a few more tools at your disposal to move things. It might be worth a shot.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s