Find files older than X minutes
To find files that are older than X minutes, use the command
1 |
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
1 |
find /path/ -type f -mmin +30 -delete |
To find files created in the last 30 minutes, run
1 |
find /path/ -type f -mmin 30 |
See find