Search inside files - linux

Associate
Joined
28 Apr 2003
Posts
492
I'm looking for any easy to use utiliy to search inside files.

This is possible in windows search and I'm looking for an easy way to do it in linux.

Basicaly what I want is to to be able to search for strings within c++ or h files just by pointing an application at a folder and specifying the string to search for.

Anyone know of a good app to do this?

It's a pain in the *** having to open each file in a project and having to search for a string or function if it can be done in on in one swoop.
 
grep ;) eg:-

grep "href" *.html

would match all html documents in the current directory with the words href in them. -r or -d would recursive do a directory. there are a number of options for grep. ( man grep ) If you wanted to you could put it into a bash script thats asks you for the "href" part.

Cheers
Deano
 
Back
Top Bottom