Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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 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.

share|improve this question
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.