LoginSignup
1
1

More than 5 years have passed since last update.

【Linuxコマンド】grepで特定ディレクトリ配下のファイル内検索

Posted at

秀丸エディタなどでよく使うgrep検索。Linux上では下記のコマンドで実現できる。

grep -rl {検索対象の文字列} {検索対象のパス}

例) カレントディレクトリ配下の"hello"が含まれるファイルを検索

$ grep -rl hello .
./a.txt
./bk/text.txt.bk
./test.txt
./tmp/20190307/sample.txt.20192307
1
1
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
1
1