title: Remove Files older than 3 years
body: <p>I need to remove any file in the directory that is older than 2 years old. It is very important that I keep the newest files and delete the old files.  </p>
  
  <p>I have searched and found this.  </p>
  
  <pre><code>find /path/to/files* -mtime +365 -exec rm {} \;
  </code></pre>
  
  <p>Can I just multiply the number?</p>
  
  <pre><code>find /path/to/files* -mtime +1095 -exec rm {} \;
  </code></pre>
  
  <p>Is there a way to add a switch that will print the file name to the screen as it removes it? To make sure it is doing what I am expecting? </p>
  
  <p>I have also found this: </p>
  
  <pre><code>find /rec -mtime +365 -print0 | xargs -0 rm -f
  </code></pre>
  
  <p>Is there a major difference between the two?  Is one better than the other? What I have read says that xargs is faster. Would I be able to multiply the mtime number out to a 2nd or 3rd year?</p>
  
  <p>And finally would would I be able to place the code as it is into a cron job that can run daily?</p>
  
  <p>Thank you!</p>