LoginSignup
8
6

More than 3 years have passed since last update.

特定の文字列を含むファイルを検索【find・grep・xargs】

Last updated at Posted at 2018-07-12

ファイル名に特定の文字列を含むファイルを検索する

$ find . -type f -name "*[検索したい文字列]*"


ファイル内に特定の文字列を含むファイルを検索する

$ grep [検索したい文字列] -rl .


ファイル名とファイル内に特定の文字列を含むファイルを検索する

$ find . -name "*[検索したい文字列]*" | xargs grep [検索したい文字列]
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