【问题标题】:awscli s3 sync wildcardsaws cli s3 同步通配符
【发布时间】:2019-08-31 08:38:17
【问题描述】:

我正在尝试将目录中以“model.ckpt”开头的所有文件同步到 S3 存储桶路径,方法是:

aws s3 sync ./model.ckpt* $S3_CKPT_PATH

但我得到了错误:

Unknown options: ./model.ckpt-0.meta,<my S3_CKPT_PATH path>

但是,aws s3 sync . $S3_CKPT_PATH 可以工作,但给了我很多我不想要的额外文件。

有人知道我该怎么做吗?

【问题讨论】:

    标签: amazon-web-services amazon-s3 synchronization wildcard aws-cli


    【解决方案1】:

    当使用aws s3 sync 时,文件夹中的所有文件都包括在内。

    如果你想指定通配符,你需要Use Exclude and Include Filters

    例如:

    aws s3 sync mydir s3://bucket/folder/ --exclude "*" --include "model.ckpt*"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-12-12
      • 2015-10-10
      • 1970-01-01
      • 2020-08-06
      • 2020-02-14
      • 2015-01-21
      • 2016-12-14
      • 1970-01-01
      相关资源
      最近更新 更多