How to copy S3 file that include hash as part of the name

0

I have a couple of file in S3 example filename.38207305.tar.gz, how do I copy this file without copying all the files in a folder?

I'm using: aws s3 cp s3://bucket-name/folder-name/sub-folder-name/ . --recursive --include "*.tar.gz" How do I copy the latest modified file?

1 Risposta
0

UPDATE: This will list the latest version, but is does not copy the specific file that includes hash as part of the file name.

aws s3 ls s3://bucket-name/folder-name/sub-folder-name/ --recursive | sort | tail -n 1

con risposta 9 mesi fa
  • Your object is called file#tar..tgz or something like that?

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande