Search for text in file Mac/Linux terminal

A very useful thing to be able to do is to find in which files certain text is contained. Open the terminal and run the following command:

grep -r "some text to find" /path/to/searchable/folder

The -r flag searches through all files in all subdirectories of /path/to/searchable/folder