grep -r in UNIX

You can search recursively i.e. read all files under each directory by using grep -r.

Syntax:
grep -r [search string] [directory]

Example:
Consider the following contents in 1.txt and 2.txt
1.txt:I am coming from forget code
2.txt:code is great

grep-r 'code' /var/root/*

Output:
/var/root/1.txt:I am coming from forget code
/var/root/2.txt:code is great