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回答
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

回答済み 10ヶ月前
  • Your object is called file#tar..tgz or something like that?

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ