[英]AWS CLI Command
我正在嘗試使用AWS CLI命令執行以下命令-
aws s3 cp s3://my_bucket/folder/file_1234.txt -| pipe to sed command | pipe to jq command | aws s3 cp - s3://my_bucket/new_folder/final_file.txt
上面的代碼運行良好-基本上是從s3中提取數據,進行一些操作並將其推回到s3中。
現在,我在s3中有一些具有模式的文件-例如-file_771.txt,file_772.txt,file_773.txt等。
現在,為了獲取與模式匹配的所有文件,我正在執行以下操作,該操作無法按預期進行。 它在s3中生成一個空的輸出文件。
aws s3 cp --include file_77* s3://my_bucket/folder/ -| pipe to sed command | pipe to jq command | aws s3 cp - s3://my_bucket/new_folder/final_file.txt
此代碼生成空的final_file.txt。 任何原因 ? 我在代碼中缺少什么嗎?
要一次復制多個文件,您必須使用--recursive
,在這種情況下,請使用--exclude "*" --include "file_77*"
,但是:
當前以流形式下載與--recursive參數不兼容
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.