我在 AWS s3 存盤桶上,檔案夾中有數百個 CSV。我想列出(即 ls)包含我要查找的文本/單詞的 CSV 檔案的名稱。
aws s3 ls s3://path/folder/ | grep -l 'word' *.csv
上面的命令回傳此錯誤。
grep: *.csv: No such file or directory [Errno 32] Broken pipe Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'> BrokenPipeError: [Errno 32] Broken pipe
請讓我知道如何重寫它,以便它顯示包含文本/單詞的檔案。
uj5u.com熱心網友回復:
嘗試這個:
grep -rn --include=*.csv "word"
或者:
grep word *.csv
uj5u.com熱心網友回復:
我似乎無法在 AWS s3 內的 CSV“物件”內進行搜索。為此,我需要使用 AWS Athena 之類的服務。
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/363914.html
