Use wildcards to delete files on AWS S3


The aws cli tool doesn’t directly support wildcards, but there is a workaround with the --exclude and --include parameters.

aws s3 rm s3://example-bucket/ --exclude="*" --include "blah*"

Normal wildcards * and ? are allowed, but so are regex-like [chars] and [!chars].
Details

Tags:  aws

Share: