title: Linux - Delete directories which are older than x days
body: <p>I'd like to know how I could delete all directories which are older than 14 days, without deleting their sub-folders.</p>
  
  <p>I had been using the following command, but this will also check / delete all located sub-folders which are bound to their main directories:</p>
  
  <pre><code>find /path/ -mtime +14 -type d | xargs rm -f -r;
  </code></pre>
  
  <p>So it basically should only check if directories in /path/ are older than 14 days and delete them if so.
  My current command above does also check their sub-folders and delete those if older than 14 days, <strong>but it shouldn't check them</strong> - only the "main" folders in /path/.</p>
  
  <p>Chris</p>