LoginSignup
8
6

More than 5 years have passed since last update.

複数のファイルの中から特定の文字列を探す

Posted at

ちょっと間があきましたが。

Linuxコマンドで複数のファイルの中から特定の文字列を探したいと思います。

ログファイルの中に「警告」という熟語が出力されているものを探すと。
ログファイルひとつひとつ確認していたこともあったんですがさすがに・・・と思いまして。

$ grep -l '警告' * 

で、そのディレクトリ内で"警告"という文字列を含むファイルをすべて
出力してくれます。

8
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
6