linux - 使用 Linux Find 并将内容通过管道传送到 S3 存储桶

标签 linux amazon-web-services amazon-s3 find command-line-interface

我正在尝试以下操作,但出现错误。有人用过 find 和 S3 copy 吗?对此一直无法找到好的答案。 aws CP 命令与 --recursive 选项、同步等配合使用效果很好。但是尝试看看是否可以做到这一点。文档对此的回答似乎很粗略。

find . -mtime -3 | aws s3 cp <find result> s3://<bucketname>

最佳答案

您需要将输出流通过管道传输到 S3 存储桶对象。

示例:

find . -mtime -3 | aws s3 cp - s3://<BUCKET_NAME>/<OBJECT_NAME>.txt

关于linux - 使用 Linux Find 并将内容通过管道传送到 S3 存储桶,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50185409/

相关文章:

linux - "In-source builds are not allowed"在 cmake

linux - objdump 将文本段的内容提取为二进制格式

c - 关于 C 中 3D 数组的问题

android - 使用 MCC、MNC、LAC 和小区 ID 查找位置

java - aws cloudhsm C_FindObjectsInit CKR_ATTRIBUTE_TYPE_INVALID

amazon-web-services - 我应该担心 Amazon S3 上的位翻转吗?

go - 使用 golang 从 S3 读取多个文件

amazon-web-services - 将子域指向 Cloudfront 时连接不安全

amazon-web-services - 有没有办法在 AWS CloudFormation 模板中进行继承或代码重用?

python - boto3:类型错误:| 不支持的操作数类型: 'str' 和 'str'