How can I use wildcards to `cp` a group of files with the AWS CLI

后端 未结 3 2121
执念已碎
执念已碎 2021-01-30 07:34

I\'m having trouble using * in the AWS CLI to select a subset of files from a certain bucket.

Adding * to the path like this does not seem to w

3条回答
  •  不知归路
    2021-01-30 08:19

    To download multiple files from an aws bucket to your current directory, you can use recursive, exclude, and include flags. The order of the parameters matters.

    Example command:

    aws s3 cp s3://data/ . --recursive --exclude "*" --include "2016-08*"
    

    For more info on how to use these filters: http://docs.aws.amazon.com/cli/latest/reference/s3/#use-of-exclude-and-include-filters

提交回复
热议问题