I have an S3 bucket from which I would like to copy:
*.log, *070719*.csv, etc.)Is there any way to do this from the AWS CLI?
Yes, you can.
Take a look at AWS CLI documentation: Use of Exclude and Include Filters:
Currently, there is no support for the use of UNIX style wildcards in a command's path arguments. However, most commands have
--exclude "<value>"and--include "<value>"parameters that can achieve the desired result. These parameters perform pattern matching to either exclude or include a particular file or object.For example, if the filter parameters passed to the command were:
--exclude "*" --include "*.txt"All files will be excluded from the command except for files ending with
.txt.
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