title: Execute multiple commands on target files from find command
body: <p>Let's say I have a bunch of <code>*.tar.gz</code> files located in a hierarchy of folders. What would be a good way to find those files, and then execute <strong><em>multiple</em></strong> commands on it.</p>
  
  <p>I know if I just need to execute one command on the target file, I can use something like this:</p>
  
  <pre><code>$ find . -name "*.tar.gz" -exec tar xvzf {} \; 
  </code></pre>
  
  <p>But what if I need to execute <em>multiple</em> commands on the target file? Must I write a bash script here, or is there any simpler way?</p>
  
  <p>Samples of commands that need to be executed a <code>A.tar.gz</code> file:</p>
  
  <pre><code>$ tar xvzf A.tar.gz   # assume it untars to folder logs
  $ mv logs logs_A
  $ rm A.tar.gz
  </code></pre>