LoginSignup
0
0

More than 1 year has passed since last update.

grepするときに任意のフォルダを除外する

Posted at

(自身の備忘録用です)

grep時、除外したいフォルダがある場合、--exclude-dirを付与します

grep -r [検索文字列] --exclude-dir=[除外フォルダ] ./

例)
grep -r [検索文字列] --exclude-dir=node_modules ./
grep -r [検索文字列] --exclude-dir={node_modules,tests} ./ 
 →複数指定したい場合は括弧で囲む
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