This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new!

Find a string within the files

Posted by: Anonymous Coward on July 11, 2006 08:03 AM
I frequently use find to locate files that contain a certain string.

find . -type f -iname '*.php' -exec grep -l -i "user" {} \;

This will locate all<nobr> <wbr></nobr>.php files containing the string 'user'.

Perhaps not monumental but it might help somebody.


Return to CLI Magic: Searching with find