Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to copy a bunch of folders recursively. However, I don't want one error preventing the copy from finishing. Is there any way to do a recursive copy(cp -R), ignoring (but logging) all errors produced? I'm on Mac OS X, but I assume the answer would be the same for *nixes.

share|improve this question
up vote 14 down vote accepted

Hey, you might want to check out rsync ( ). It can do a more reliable job and only copy the files that didn't copy the first time:

rsync -vza --progress /source/ /destination/

Good luck!

share|improve this answer
This is awesome. Thank you! – benjy Apr 15 '13 at 17:54
Absolutely exactly what I needed, with a springling of --exclude="<globpattern>" and --delete to keep a try perfectly synched from one project to the next. – Martijn Pieters Feb 6 '14 at 16:17

Found the answer: ditto(1)

share|improve this answer
Please share it here so that future people can learn.. – James Polley Jan 5 '10 at 10:21
I did share the answer... it is ditto. Syntax: ditto <src dirs> <dst dir> – Mike Jan 5 '10 at 10:25
Odd; when I first viewed this it was a broken image. – James Polley Jan 5 '10 at 10:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .