Handy Linux Commands
Searches for files by their name
(ref: 25 simple examples of Linux find command, http://www.binarytides.com/linux-find-command-examples/ )
Finding all files containing a text string on Linux
-r or -R is recursive,
-n is line number, and
-w stands match the whole word.
-l (lower-case L) can be added to just give the file name of matching files.
Along with these, --exclude or --include parameter could be used for efficient searching. Something like below:
This will only search through the files which have .c or .h extensions. Similarly a sample use of --exclude:
Above will exclude searching all the files ending with .o extension. Just like exclude file it's possible to exclude/include directories through --exclude-dir and --include-dir parameter; for example, the following shows how to integrate --exclude-dir: