I was trying to copy some files from s3://arxiv/src to my local machine for test. And I tried to use following command to copy the src dump files of January, 2015:
aws s3 cp s3://arxiv/src . --recursive --include "arXiv_src_1501_*.tar" --request-payer requester
However, I got files like
download: s3://arxiv/src/arXiv_src_0003_001.tar to ./arXiv_src_0003_001.tar
download: s3://arxiv/src/arXiv_src_0005_001.tar to ./arXiv_src_0005_001.tar
download: s3://arxiv/src/arXiv_src_0007_001.tar to ./arXiv_src_0007_001.tar
download: s3://arxiv/src/arXiv_src_0006_001.tar to ./arXiv_src_0006_001.tar
download: s3://arxiv/src/arXiv_src_0009_001.tar to ./arXiv_src_0009_001.tar
download: s3://arxiv/src/arXiv_src_0008_001.tar to ./arXiv_src_0008_001.tar
download: s3://arxiv/src/arXiv_src_0010_001.tar to ./arXiv_src_0010_001.tar
download: s3://arxiv/src/arXiv_src_0011_001.tar to ./arXiv_src_0011_001.tar
download: s3://arxiv/src/arXiv_src_0012_001.tar to ./arXiv_src_0012_001.tar
download: s3://arxiv/src/arXiv_src_0101_001.tar to ./arXiv_src_0101_001.tar
download: s3://arxiv/src/arXiv_src_0102_001.tar to ./arXiv_src_0102_001.tar
download: s3://arxiv/src/arXiv_src_0103_001.tar to ./arXiv_src_0103_001.tar
download: s3://arxiv/src/arXiv_src_0105_001.tar to ./arXiv_src_0105_001.tar
download: s3://arxiv/src/arXiv_src_0104_001.tar to ./arXiv_src_0104_001.tar
download: s3://arxiv/src/arXiv_src_0106_001.tar to ./arXiv_src_0106_001.tar
download: s3://arxiv/src/arXiv_src_0107_001.tar to ./arXiv_src_0107_001.tar
download: s3://arxiv/src/arXiv_src_0108_001.tar to ./arXiv_src_0108_001.tar
I am confused about this match pattern. Appreciate anyone that helps.
try this way.
source: https://docs.aws.amazon.com/zh_tw/cli/latest/userguide/cli-services-s3-commands.html#using-s3-commands-managing-objects-move
Yeah, it did work! Thanks a lot for your help!