Find files older than X minutes

To find files that are older than X minutes, use the command

find /path/ -type f -mmin +30

This will find all files inside /path/ that are older than 30 minutes.

If you need to delete those files, run

find /path/ -type f -mmin +30 -delete

To find files created in the last 30 minutes, run

find /path/ -type f -mmin 30

See find

Comments

Leave a Reply

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