awscli s3 同步通配符

awscli s3 sync wildcards

我正在尝试将目录中以 "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 有效,但给了我很多我不想要的附加文件。

有人知道我该怎么做吗?

使用aws s3 sync时,包含文件夹中的所有文件。

如果您希望指定通配符,您需要Use Exclude and Include Filters

例如:

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