title: Recursive copy to relative destination paths
body: <p>I was thinking something like what I'm trying to accomplish could be done with built in shell tools w/o the need for a more complicated script.</p>
  
  <p>I'd like to find all the files in a path and copy them to a destination basepath retaining the relative paths they were found in.</p>
  
  <p>Example:</p>
  
  <p>Say I ran:</p>
  
  <pre><code>[~:] find /path/src  \( -name "*.jpg" -o -name "*.gif" \) 
  </code></pre>
  
  <p>and that returned:</p>
  
  <pre><code>/path/src/a.jpg
  /path/src/dir1/b.jpg
  /path/src/dir2/dir3/c.gif
  </code></pre>
  
  <p>I'd like them to all end up in:</p>
  
  <pre><code>/path/dest/a.jpg
  /path/dest/dir1/b.jpg
  /path/dest/dir2/dir3/c.gif
  </code></pre>
  
  <p>I tried an <code>-exec cp {} /path/dest \;</code> flag to <code>find</code> but that just dumped everything in /path/dest.  E.g:</p>
  
  <pre><code>/path/dest/a.jpg
  /path/dest/b.jpg
  /path/dest/c.gif
  </code></pre>