jsonファイル(exclude.json.gz)のみをgrepする方法は?

jsonファイル(exclude.json.gz)のみをgrepする方法は?

私はこれを試しました

 grep -r --include=\*.json 'ticr_calculated_3' ./

ファイルはありますが、何もありません。

tick_calculated_3_2020-05-27T11-52-59.json
tick_calculated_3_2020-05-27T11-55-08.json
tick_calculated_3_2020-05-27T11-57-30.json
tick_calculated_3_2020-05-27T11-59-59.json

なぜ?

ベストアンサー1

ファイルの内容は検索します.jsonが、.json.gzファイルの内容は検索しない場合は、次の手順を実行します。

$ grep 'pattern' *.json

おすすめ記事