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?

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠