windows - aws s3 sync --recursive 在 Windows 中不起作用

标签 windows amazon-web-services powershell amazon-s3 cmd

我在 Windows cmd 中使用 AWS-CLI 并运行 AWS s3 同步命令,但它不适用于 --recursive,它显示未知选项:--recursive

aws s3 sync --recursive localpath s3://bucket-name

python --version python 3.6.5

aws --version aws-cli/1.15.38 Python/2.7.9 Windows/2012Server botocore/1.10.38

请帮忙

最佳答案

aws s3 sync命令已经是递归的,所以不需要递归选项,也没有递归选项:

Syncs directories and S3 prefixes. Recursively copies new and updated files from the source directory to the destination. Only creates folders in the destination if they contain one or more files.

此外,sync 命令只会复制目的地上尚不存在的内容。如果您指向一个文件夹,它将递归地同步您的目标目的地中尚不存在的所有内容。这与 aws s3 cp 不同命令。 cp 命令复制您告诉它的任何内容,无论它是否已经存在于目标上。 cp 命令采用 --recursive 选项来递归复制文件夹。

关于windows - aws s3 sync --recursive 在 Windows 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50874552/

相关文章:

c++ - 应用程序如何在反汇编中处理 try catch 中的异常

python - 具有多处理功能的 py2exe 无法运行进程

amazon-web-services - cloudformation 是否会在删除旧资源之前创建新资源?

memory - 为什么 EMR 实例没有像映射器那样多的缩减器?

ms-access - 使用 powershell 自动化 MSACCESS 应用程序

arrays - PowerShell:将十六进制变量转换为单个(float32)大端变量

c++ - 为什么我的程序不能正确地注入(inject)我的 .dll?

windows - 如何在 Windows 上设置 Spark?

security - 测试 CloudFormation 的安全气味

powershell - 使用 Powershell 以纯文本形式获取 Azure Devops secret 变量