Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ファイル (.gz) を取得し、検索後に自動的に読み取ろうとしています。これを「find」コマンドの [action] 部分に含めたいのですが、残念ながら何らかの理由で機能していません。私がやっていることは次のとおりです。
find . -name *20120805.gz -zcat
私が得たものは次のとおりです:find:無効な述語「-zcat」
その行動の何が問題なのですか?何かアドバイス?
それは本当に無効な述語です。-execこの場合、次を使用する必要があります。
-exec
$ find . -name *20120805.gz -exec zcat {} \;
見つかったすべてのファイルに対して、ファイルの名前を引数として実行しますfind。zcat
find
zcat