【问题标题】:Need to copy files with particular extension from multiple folders to a single folder in aws s3 bucket需要将具有特定扩展名的文件从多个文件夹复制到 aws s3 存储桶中的单个文件夹
【发布时间】:2017-12-27 19:03:15
【问题描述】:

我希望将多个文件夹中的所有“*.txt”文件复制到 aws s3 存储桶中的一个文件夹中。我使用了以下命令。复制文件时,它还会在目标存储桶中创建相同的文件夹结构。我在这里想念什么?请指教。

aws s3 cp s3://source-bucket/ParentFolder/MultipleTxtFilesFolders/ s3://target-bucket/ParentFolder/OneTxtFilesFolder/ --exclude '*' --include '*.txt' --sse AES256 --profile target --recursive

【问题讨论】:

    标签: amazon-web-services amazon-s3


    【解决方案1】:

    据我所知,cp spec 没有显示名为 --profile 的参数。

    试试

    aws s3 cp s3://source-bucket/ParentFolder/MultipleTxtFilesFolders/ s3://target-bucket/ParentFolder/OneTxtFilesFolder/ --exclude '*' --include '*.txt' --sse AES256 --recursive
    

    如果您需要控制权限,请查看 --grants

    【讨论】:

    • 在存储桶之间复制和管理用户访问需要配置文件参数。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-06-04
    • 1970-01-01
    • 1970-01-01
    • 2020-05-19
    • 2016-10-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多