title: Checking A Folder For Logs Files
body: <p>Hello and thank you for for the help in advanced. I am trying to accomplish a simple check to see if a folder contains any files in end in .log. And if it does contain any file ending in a .log, simply copy it to another folder. I did try something like</p>
  
  <pre><code>if [ -f /path/to/log/*.log ]; then cp -a /path/to/log /path/to/backup/folder; fi
  </code></pre>
  
  <p>But that does not give me anything clean enough to work with.</p>
  
  <p>Thanks so much</p>