title: Linux zip up all log files
body: <p>I'm trying to zip up all .log files in a my log directory. I want to zip each log file individually and keep it in the same directory, then delete the original. I'm somewhat new to using Linux and for loops in Linux. Here is the for loop I'm trying to run</p>
  <pre><code>ssh user@SERVER &quot;for i in *.log; do zip -m \&quot;${i%.*}.zip\&quot; \&quot;${i%.*}\&quot;.*; done&quot;
  </code></pre>
  <p>What ended up happening is all of my hidden files got zipped up. Like I said, I'm kinda new so, whatever syntax error I made isn't jumping out at me. Any help would be appreciated</p>