Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

162
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda