Don't copy files that cause an input/output error

5

1

When copying files from a faulty hd with cp, rsync, or scp, the faulty files which can't be read anymore are also partly copied to the destination directory.

Is there an option to automatically skip or delete files on the destination drive causing an input/output error while copying?

Thibaut

Posted 2011-09-21T17:12:59.733

Reputation: 51

See http://stackoverflow.com/a/27637277 for --ignore-missing-args option.

– spyle – 2016-09-20T14:57:41.667

Answers

3

rsync has options --delete and --ignore-errors that together might have the outcome you want.

RedGrittyBrick

Posted 2011-09-21T17:12:59.733

Reputation: 70 632