如何使用通配符通过AWS CLI来"cp"一组文件 [英] How can I use wildcards to `cp` a group of files with the AWS CLI
本文介绍了如何使用通配符通过AWS CLI来"cp"一组文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我无法在AWS CLI中使用*
从特定存储桶中选择文件的子集.
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 work
aws s3 cp s3://data/2016-08* .
推荐答案
要将aws存储桶中的多个文件下载到当前目录,可以使用recursive
,exclude
和include
标志,如下所示:
To download multiple files from an aws bucket to your current directory, you can use recursive
, exclude
, and include
flags like this:
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
这篇关于如何使用通配符通过AWS CLI来"cp"一组文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文