LoginSignup
0
3

【Linux】ディレクトリ配下のファイルに含まれる文字を検索するコマンド

Last updated at Posted at 2017-07-23

カレントディレクトリ配下の全てのファイルに対して、ある文字列が含まれているかを検索する方法

■大文字小文字を区別して検索する場合
find ./ -type f -print | xargs grep '[検索する文字]'

■大文字小文字を区別しないで検索する場合
find ./ -type f -print | xargs grep -i '[検索する文字]'

使用例
スクリーンショット 2017-07-23 14.38.32.png

※ Readme.txt の内容

0123
Test

※ test.txtの 内容

0123
test
test0123
4567
0123test
Test
89
0
3
2

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
0
3