title: Linux find and copy files with same name to destination folder do not overwrite
body: <p>I want to find and copy all files with <code>*.jpg</code> in one folder includes its sub folder to another folder
  I use</p>
  
  <pre><code>find /tempL/6453/ -name "*.jpg" |  xargs  -I  '{}' cp {} /tempL/;
  </code></pre>
  
  <p>but it overwrite files with same name</p>
  
  <p>for example in <code>/tempL/6453/</code>, there are <code>test (1).jpg</code> <code>test (2).jpg</code> and folder 1, in <code>/tempL/6453/1/</code>, there are also have files with the same name <code>test (1).jpg</code>  <code>test (2).jpg</code></p>
  
  <p>If I use the above command, there are only two files <code>test (1).jpg</code> <code>test (2).jpg</code> in <code>/tempL/</code>, it can not copy all files to <code>/tempL/</code>.</p>
  
  <p>What I want is to copy all files to <code>/tempL/</code>, when there are same file name, just rename them, how to?</p>