Score:0

AWS CLI Unknown options: --include,*.m3u8 For S3

cn flag

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.

Tim P avatar
af flag
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.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.