Quickzi: Delete files that are a year old

Here’s a quick tip on how to delete files that are a certain amount of days old. In my example, I use 365 days.

find / -type f -mtime +365|xargs rm -f

You could easily replace 365 with any amount of days to achieve a different goal.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>