Using Find w/ Grep?

Hey,

I have a Find command like:

find $searchDir -type f

and this returns a list of files under the directory, which is all good, but, I want to filter that search for files that contain the string "people"

I tried something like:

find $searchDir -type f -exec grep "people" '{}' \;

But this returns the actual lines from the file..... not the file names

Can anyone help me out w/ what I'm doing incorrect?

find $searchDir -type f -exec grep "people" '{}' /dev/null \;

grep will give the name if more than one file at a time is searched. This give it /dev/null as the second file, so you will get the found lines AND the file name.

Using find is redundant, read the man page of grep for the used options:

grep -lr 'people' /your_dir/*

Regards