I am copying a folder in Linux with plenty of files. Some of the files give me errors like this:

Error splicing file: Input/output error

The problem is that it keeps the file in the new location although it doesn't open. I would like to write a command that would simply skip the file if this type of error occurs and doesn't delete it from the new location.

My final directory should have only those files in which the error doesn't occur.

  • If some of the system's commands act like that (partially copied files or other junk lying around after an error) it is a serious bug, to be reported. – vonbrand Mar 14 '14 at 10:18
  • rsync will do what you want. – Gaius Mar 14 '14 at 11:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.