There are at least a couple of ways to do that.
1. use the grep command via SSH. grep -Ri foo public_html
will search all files within public_html for the string 'foo'
2. within the cPanel file manager, there is a search field in the upper right corner. That does the equivalent of the grep command.