I believe that the following can be used to locate files that contain the contents 'SomeString' or 'SomeOtherString':
Code:
find /home/username/public_html -type f -print0 | xargs -0 egrep -l 'SomeString|SomeOtherString'
How would I limit this to searching for the text 'SomeString' or 'SomeOtherString', but only if the file has extension .php, .inc or .js?
Also - can someone help explain details of what piping to xargs does here? I don't understand how this command actually works.