If the string is in the file name, use
find /etc -name '*.*' -type f -regex 'string'
where /etc is the directory to search, -name '*.*' is the filename unspecified (wildcards), -type f is regular file (see man find for other file types), and -regex 'string' is the string in the filename.
If you want to find 'string' inside the file, not in the filename, use
find /etc -name '*.*' -type f | xargs grep 'string'
where /etc, -name, and -type are explained above, | is the pipe symbol (pipe the output of find through another command), and the other command is grep to find the 'string' inside the file.
However, it the 'string' is in the filename, a much faster way to find the file is to use the locate command. Locate uses a database of all filenames on the system. The database is built using the updatedb command, which must be run as root.
So, su to root and run updatedb to update the database of filenames, then run locate 'string' (without quotes) to find the filenames with the 'string' in the filename.
Last edited by bigrigdriver; 10-31-2006 at 08:46 PM.