Search String in Directory – UNIX
How to search for a string in a selection of files (-exec grep …).
[bash]
find . -exec grep “searchstring” ‘{}’ \; -print
[/bash]
[bash]
find . -exec grep “searchstring” ‘{}’ \; -ls
[/bash]
This command will search in the current directory and all sub directories. All files that contain the string will have their path printed to standard output.