how to search for a word in files in linux

C++
grep -R "keyword" /directory/# this will search all subdirectories for text (no case sensitivity)
grep -inR "your text" .grep -rnw '/path/to/somewhere/' -e 'pattern'
Source

Also in C++: