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 Antwort
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

beantwortet vor 10 Monaten
  • Your object is called file#tar..tgz or something like that?

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen