LoginSignup
6
10

More than 5 years have passed since last update.

grepコマンド使い方

Last updated at Posted at 2017-05-08

grepコマンドを使うときいつもググってしまうのでメモ。随時追加

grepコマンドを使う

$ grep (オプション) (検索ワード) (対象ファイル、ディレクトリ)

オプション

オプション 概要
-r 特定ディレクトリ以下を再帰的に検索する
指定したディレクトリより下の階層を全て
検索してくれます
-n パターンに一致した行のファイル内での行番号を
表示す検索ワードがファイルのどの行かわかる
のでより詳細に知ることができます
-i 大文字と小文字を区別しない
検索範囲に入らないなどの取りこぼしを防げます
6
10
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
6
10