title: BASH deletion script on file age
body: <p>I am a scripting novice.  I am trying to write a simple bash script for my Ubunutu 10.04 server to delete archives in a folder older than 30 days &amp; older than a year in a different folder.  They can be two different command lines, as I will be putting them in different scripts.</p>
  
  <p>I was just starting out by trying the following, which does not work at all:</p>
  
  <pre><code># find ~/addon_backups/202 -name 202adata* -maxdepth 0 -ctime +30
  </code></pre>
  
  <p>and</p>
  
  <pre><code># find ~/addon_backups/202/ME -name *.tar.gz -maxdepth 0 -ctime +365
  </code></pre>
  
  <p>I am getting the following respectively:</p>
  
  <pre><code>find: paths must precede expression: 202adata_010213.tar.gz
  Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
  </code></pre>
  
  <p>and</p>
  
  <pre><code>find: paths must precede expression: 0213ME-202.tar.gz
  Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
  </code></pre>
  
  <p>I have tried multiple variations and I am clearly missing something.  Any help is appreciated.</p>