title: cp command within php resulted in a partial copy
body: <p>I have a small PHP script I wrote to help me push changes from staging to production.  I run both staging and prod on the same server so my script copies changes from staging folders to prod folder.  </p>
  
  <p>This has been working fine until today when I had a few instances when files were only partially copied over resulting in some down time.  I'm wondering if a user accessing a Web page using a file being copied at the exact same time resulted in an interruption of the cp command and a partial file copy.  Any ideas or solutions?</p>
  
  <p>The copy command is basically:</p>
  
  <pre><code>exec( 'cp -Rfpuv /staging/folder/path /prod/folder/path' );
  </code></pre>
  
  <p>The server is a basic LAMP stack, with Apache 2, PHP 5, MySQL 5 and CentOS 5.</p>