Copy all Possible Files Ignoring Errors on macOS with Terminal CP

For drives and volumes that are partly corrupted, or prone to I/O device errors, you can use these copy techniques to backup & restore as much files as possible.

Ignore Copy Errors

Use the terminal app and run these “cp” commands via command line;

Copy Method #1

cp -Rfv source destination

The “f” option ensures that only intact data is copied by checking if the file can be opened at the destination. If it removes a bad file, it will just continue to the next.

Copy Method #2

cp -Rv source destination

When specifying the recursive “R” option, it will simply ignore or continue copying even if there are errors. Meaning that corrupt files will be copied over as well.

The “source” can be a file, directory or an asterix.

Verbous “V” mode is optional.

Some may like to add “P” to preserve file attributes such as, modification time, file flags, modes, user ID and group, access time, etc.

Comments below are more than welcome!

Thank you for reading, David.

1 thought on “Copy all Possible Files Ignoring Errors on macOS with Terminal CP”

Leave a Comment