title: looping through files older than 2 hours in bash
body: <p>I have a small script that I would loop through an ftp and if it finds a file older than lets say 2 hours it will execute a command, this loop also has another condition which I dont need help on. I only need help on finding files older than n minutes. This is what I have </p>
  
  <pre><code>for file in $(ls); do
  
  if [ $file is older than 2 hours ] &amp;&amp; [ another condition   ]; then
          #execute a command
  fi
  
  done
  </code></pre>