How to delete files older than a specific number of minutes

Re: Use BASH to delete files older than so many minutes

When working with temporary files it is often good housekeeping to clear (delete) files older than a specific number of minutes. Use the following in bash command to achieve this goal:

# find /tmp/file* -type f -mmin +65 -delete

The above command will delete all files older than 65 minutes. Modify as appropriate.

Was this helpful?
How to delete files older than a specific number of minutes written by UKC average rating 5/5 - 1 user ratings