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

149
Vistas
S3 cli includes not working

Alright I'm very confused by aws cli

I have an S3 bucket:

s3://my-bucket
  directory/
    file1
    file2
  backup-logs-1234
  backup-logs-5678

I've verified that the files are in the s3 bucket, and I can see them with aws s3 ls s3://my-bucket

I'm trying to delete all the backup logs in the folder (8000 of them). I've tried every combination of includes/excludes I can think of

1) For some reason aws s3 rm "s3://my-bucket/" --include "*backup-logs*" --dryrun tries to delete s3://my-bucket/directory/

2) aws s3 rm "s3://my-bucket/" --exclude "*" --include "*backup-logs*" --dryrun doesn't see any files to delete

3) I've also tried different substrings of "backup" (eg. b, ba, back)

4) I've also tried adding recursive (even though I don't want it to be) and it finds all the files in directory/ that match the pattern, but none of the top level ones

I'm sure I'm doing something stupid. Thanks in advance for the help

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

aws s3 rm s3://my-bucket/ --recursive --exclude "*" --include "*backup-logs*" should work.

When you want to delete multiple objects within your bucket

--recursive (boolean) Command is performed on all files or objects under the specified directory or prefix.

You can read on http://docs.aws.amazon.com/cli/latest/reference/s3/index.html#use-of-exclude-and-include-filters about include/exclude use

about 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