http://docs.aws.amazon.com/cli/latest/reference/s3/rm.html
s3://foo/2015-01-01/..
s3://foo/2015-01-02/..
s3://foo/2015-01-03/..
..
s3://foo/2016-01-01/..
s3://foo/2016-01-02/..
s3://foo/2016-01-03/..
In the above setup, I would like to apply wild card on my removals.
e.g. aws s3 rm s3://foo/2015*
or
aws s3 rm s3://foo/2016-02-*
I am unable to achieve this with the existing command, is it achievable since I have large number of files to delete and I would like to run commands in parallel for faster deletes.
Currently, there is no support for the use of UNIX style wildcards in a command's path arguments, but you can use --exclude "<value>"
and --include "<value>"
parameters that can achieve the desired result:
aws s3 rm s3://foo/ --recursive --exclude "*" --include "2016-02-*" --dryrun
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With