hi,
i have a simple question. i want to grep for a string recursively in all the files in a directory structure. i can achieve this objective almost completely with:
Code:
find . -exec grep "Search String" {} \; > myreport
This works just fine, the only problem is that it doesn't tell the names of the files in which the "Search String" was found.
Using the -print before the -exec results in a whole list of file names which do not contain the "Search String".
any guidance on how to do this will be very helpful. thanks!