LoginSignup
3
0

More than 1 year has passed since last update.

[grep・egrep]ある文字列を含まないファイルのリストを表示する。

Posted at

文字列を含まないファイルのリストを表示する。

grepの-Lオプションを利用して、文字列を含まないファイルのリストを表示する。

grep -L 文字列

文字列を含まないファイルを再帰的に探索し、そのリストを表示する。

grepの-rオプションを利用して、再帰的に探索する。

grep -rL 文字列

文字列を含まない(複数条件指定)ファイルを再帰的に探索し、そのリストを表示する。

grepの-Eオプションを利用して、正規表現を利用して、条件を指定する。

grep -rEL "文字列A|文字列B"

また、egrepも利用が可能。

egrep -rL "文字列A|文字列B"
3
0
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
3
0