Grep Notes

Here is the documentation of some of the useful tasks that I like to do with grep

grep man page is here

http://www.gnu.org/software/grep/manual/grep.html

the question is what are a useful subset of all the commands,

I like to use -Rni (-R: recursive, -i: ignore case, -n: line number),

grep –Rni “foo” .  

will recursively search the current directory,

sometimes when I try to ignore the binary files,

-I (is also pretty helpful)

grep –RniI “foo” .  

Advertisements
This entry was posted in Tools, Uncategorized and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s