Linux grep Command

I already listed few find commands in my previous post but i found they are of not much use when i want to search for a particular string/Word in a Directory.

Was really in need of such a command at ma workplace and then i encountered this  simple comamnd to do this after some browsing…And as Usual i am here to share this with you..

grep -r “String” /filepath…This would search the word in the specified path ex: “c/users/bin”

OR

grep -r “String” *..this would search in all directories

String here is the specific word with which you want to search with

FilePath is the directory where you want the command  to search the specified word.

Hope It helps…:) 🙂

Wud luv to hear comments….

Advertisements

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

%d bloggers like this: