Super User is a question and answer site for computer enthusiasts and power users. 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

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

migrated from Dec 20 '10 at 14:44

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

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

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

Your Answer


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