I have an external HD that has crashed, and is badly corrupted. I want to copy whatever is intact off of it, which means doing so in Terminal as the Finder will of course give up at the first failure.
It's working fine, but taking FOREVER I think because it tries multiple times for any failure. Also on any failed attempt, I end up with the file being written but with zero bytes. So I suppose my question is two fold:
- How can I make the cp command try only once and if it fails, move on?
- How can I make the cp command not write a file if it was a failed read attempt?
The command I'm currently using is:
sudo cp -Rfn /Volumes/Audio\ HD /Volumes/Audio\ HD\ 2/recovered 2>> /Volumes/iMac\ Storage/cp_errors.txt
Like I said it does work fine, but I really need to speed it up or this is going to take weeks. It's about 400GB of data to read through made up of many small files (and some large ones).
EDIT: I'm running Mac OSX Mountain Lion (latest version)