Take the 2-minute tour ×
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.

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

Error splicing file: Input/output error

The problem is that it keeps the file in new location though it doesn't open. I would like to write a Unix command that would simply skip the file if these type of error occur and don'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 at 10:18
    
rsync will do what you want. –  Gaius Mar 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.