title: tar only *.log files and delete orginals when finished
body: <p>I am using the following script to create a tarball of a directory with php</p>
  
  <pre><code>exec("tar -zcvf archive_name.tar.gz *");
  </code></pre>
  
  <p>and this is working as expected, but I would like to extend this code so that it will only add files to the tarball that have a certain extension (*.log in this case) then delete the originals after the tarball has been created. Any advise or examples would be great. </p>
  
  <p>TIA,
  Kevin</p>