Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

how i do i copy all files from dir to another dir and escape file already exist and not overwrite it , using cp command under linux centos

share|improve this question
5  
At least pretend to read the man page... –  Ignacio Vazquez-Abrams Dec 20 '10 at 5:52
    
at least try not to be so mean - who said i didnot read the MAN page! –  Anonymous Dec 20 '10 at 5:59
2  
The answer is definitely in the man page, and you would know if you looked through the options. –  Chris S Dec 20 '10 at 14:45
add comment

migrated from serverfault.com Dec 20 '10 at 14:44

This question came from our site for professional system and network administrators.

1 Answer

You could try

cp -Rn dir1 dir2

The -R means recursive (process subdirectories) and the -n means no clobber (don't overwrite).

share|improve this answer
    
thanks mikel for your help –  Anonymous Dec 20 '10 at 5:59
add comment

Your Answer

 
discard

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