>echo linux

echo> First Thoughts on Aquaria and Reinstalling WoW - http://bit.ly/8XRhLD 1 hr ago
About | Recommended Hardware | Contact

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

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 :-)

If you liked this post, please share it with all your friends!
  • Reddit
  • Digg
  • Slashdot
  • Technorati
  • Google Bookmarks
  • Live
  • Facebook
  • StumbleUpon
  • Netvibes
  • del.icio.us
  • RSS

Category: Apple, How-To

Tagged: finder, itunes, rockbox, samba, terminal

Leave a Reply

echo> newsletter

Never shall spam be sent.

About

If you've ever gone looking for help about how to do something with Linux, you know what it's like to try search after search on Google, find a good forum, and then go through half a dozen threads and maybe on to multiple forums to find the answers you need.

This site's goal is to help detail the process, instead of just answering the single question. It's the confluence of three things I love: Linux, the community of helpful people who use it, and writing articles so everyone can more easily use Linux.

Read more...

Recent Forum Posts

Archives