0

Can the AWS CLI tool be used to only list/retrieve certain file types in S3? I was trying:

aws s3 ls --summarize --human-readable --recursive s3://cloudfront.abc.com/CDNSource/hls/ --include "*.m3u8"

but receiving "Unknown options: --include,*.m3u8"

I tried grep but it will just filter the return, so the sum will still be incorrect.

I need to download all m3u8 files and then reupload them with a change.

what's the best way to do that? Any help would be greatly appreciated.

sam23
  • 49
  • 1
  • 5
  • There is no "--include" option for the ls command. You could use the query option, but if you ultimate will download all these files the sync command may be be better as it includes the "--include" option. Just issue an "--exclude *" command before the include and use the --dryrun option to get a list of what would be pulled down. No recurse would be necessary with the sync command. – Tim P Nov 10 '22 at 17:05

0 Answers0