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

link|improve this question
3  
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
feedback

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

This question came from our site for system administrators and desktop support professionals.

1 Answer

You could try

cp -Rn dir1 dir2

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

link|improve this answer
thanks mikel for your help – Anonymous Dec 20 '10 at 5:59
feedback

Your Answer

 
or
required, but never shown