2016-03-08 77 views
1

我试图将所有JSON文件从给定本地目录移至远程S3文件夹。使用CLI将本地目录中的所有JSON文件移至s3

the instructions,我已经试过:

aws s3 mv /path/to/loca/dir/     \ 
     s3://bucket-name/path/to/destination/ \ 
     --exclude "*"       \ 
     --include "*.json"      \ 
     --acl public-read      \ 
     --cache-control      \ 
     max-age=15,public 

即使有166个JSON文件/path/to/loca/dir/,该aws s3 mv命令退出安静,不动任何文件。

任何想法为什么mv将JSON文件复制到存储桶?

回答

3

您缺少--recursive标志。

当与参数--recursive通过,mv命令 递归移动的指定的前缀和铲斗下所有对象到 指定的目录。

aws s3 mv /path/to/loca/dir/ s3://bucket-name/path/to/destination/ --recursive 
+0

我是多么的愚蠢。谢谢。 –

相关问题