title: Use find to delete directory contents when over 100 MB
body: <p>I'm having a little trouble getting find to do what I want, here.</p>
  
  <p>What I'm trying to do is delete the files in a directory, when the contents of the directory get to be over 100MB (it's a cache file). I thought I had sussed it out after reading the man page, and a couple other similar but different questions here, but evidently not. If possible, I'd like it to delete only the files that are over 2 days old, but I'm not overly picky about that.</p>
  
  <p>So what I have so far is: </p>
  
  <pre><code>$ find .cache/chromium/Default/Cache/ -type d -mindepth 1 -size +100M -mtime 2 -delete
  </code></pre>
  
  <p>But when I try to run it, it gives me the following:</p>
  
  <p>find: warning: you have specified the -mindepth option after a non-option argument -type, but options are not positional (-mindepth affects tests specified before it as well as those specified after it).  Please specify options before other arguments.</p>
  
  <p>I changed it up to:</p>
  
  <pre><code>$ find .cache/chromium/Default/Cache/ -mindepth 1 -type d -size +100M -delete
  </code></pre>
  
  <p>which gave me no warning, but didn't delete a thing.</p>
  
  <p>Any advice/guidance on what I'm doing wrong?</p>
  
  <p>[edit] Currently, the directory is sitting at 433M.</p>