我在 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/