Locate a search string in a selection of files

Category
unix
Date Created
30th Oct 2009
Last Updated
9th Jul 2010

Locate a search string in a selection of files

Question

Locate a search string in a selection of files on UNIX

Answer

Locate a search string in a selection of files

find . -exec grep "swf" '{}' \; -print

The above will search for 'swf' within all files from the current location recursively (including all subdirectories).