use grep to search for text in a file code example
Example 1: find text in any file linux
grep -rnw '/path/to/somewhere/' -e 'pattern'
Example 2: ubuntu grep text in files
grep -r "mydomain.com" /etc/apache2/
grep -rnw '/path/to/somewhere/' -e 'pattern'
grep -r "mydomain.com" /etc/apache2/