LoginSignup
0
0

More than 3 years have passed since last update.

汎用性が高く調査に便利なコマンドfind grep

Last updated at Posted at 2020-11-27

findとgrepを使うことでなにができるか

ディレクトリを指定して、再帰的にgrepすることができる

指定ディレクトリ配下の全ファイルにgrep

find /var/www/wordpress/ -type f | xargs grep '検索文字列'

指定ディレクトリ配下の指定した拡張子のファイルにgrep

find /var/www/wordpress/  \( -name \*.html -or -name \*.php \) -print | xargs grep '検索文字列'
0
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
0
0