title: How to emulate 'cp --update' behavior on Mac OS X?
body: <p>The <a href="http://linux.die.net/man/1/cp" rel="noreferrer">GNU/Linux version of <code>cp</code></a> has a nice <code>--update</code> flag:</p>
  
  <blockquote>
    <p><strong>-u, --update</strong>
    copy only when the SOURCE file is newer than the destination file or when the destination file is missing </p>
  </blockquote>
  
  <p>The <a href="http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/cp.1.html" rel="noreferrer">Mac OS X version of <code>cp</code></a> lacks this flag.</p>
  
  <p>What is the best way to get the behavior of <code>cp --update</code> by using built-in system command line programs?  I want to avoid installing any extra tools (including the GNU version of <code>cp</code>).</p>