title: Recursively find and delete (*.xml / *.txt / *.csv) files older than x days in Linux
body: <p>From what I gather through a quick search on the web, you can recursively remove any files folder than x days like this:</p>
  
  <pre><code>find /path/to/the/files -mtime +7 -exec rm {} \;
  </code></pre>
  
  <p>How do you amend this to only delete <code>*.xml</code> / <code>*.csv</code> / <code>*.txt</code> files (not case sensitive) recursively and leave other files/folders alone.</p>
  
  <p>This is what I came up with and I am not sure if this is the correct way to go about this:</p>
  
  <pre><code>find /path/to/the/files -type f \( -name "*.xml" -or -name "*.XML" -or -name "*.csv" -or -name "*.CSV" -or -name "*.txt" -or -name "*.TXT" \) -mtime +7 -exec rm {} \;
  </code></pre>