Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

157
Views
find files that are older than 15 minutes

I have a chache directory setup on Amazon EBS. I'm using it as a cache for an S3FS mounted file system that holds virtual backup tapes. The tapes are being used with Bacula.

The backup to the S3 mounted directory would be way to slow to be usable without some form of local cache. The storage on S3 is of course virtually limitless. So I need to clear out the /cache directory every so often.

I want to be able to delete tape files in that directory that are older than 15 minutes.

So I tried this command:

[root@ops:~] #find /cache/jf-backup/ -type f -daystart -mmin +15
/cache/jf-backup/jf-backup-tape-0073
/cache/jf-backup/jf-backup-tape-0074

And it does find the files. Howewver they are not older than 15 minutes:

[root@ops:~] #ls -l /cache/jf-backup/
total 6199968
-rw-------. 1 root root 5368688607 Feb 25 14:39 jf-backup-tape-0073
-rw-------. 1 root root  980074496 Feb 25 14:42 jf-backup-tape-0074
[root@ops:~] #date
Thu Feb 25 14:46:59 EST 2016

How can I get the find command to only find files that are older than 15 minutes? Once I do I want to delete those files with a command like this:

find /cache/jf-backup/ -type f -daystart -mmin +15 -exec rm -rf {} \;
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

From @Jan at https://unix.stackexchange.com/questions/155184/how-to-find-and-delete-files-older-than-specific-days-in-unix, try

find /PATH/TO/FILES -type f -mmin +15 -exec rm -f {} +

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!