Recursively check the file/dir names

Hi,

' recgrep find . | xargs grep ' is used to scan the contents recursively. I have a different requirement. I need to scan just the names and check for a pattern and display with fullpath. Is that already available? Closest that I am trying is 'ls -R | grep pattern' Here I would get multiple lines , but I don't get the path.

I am trying to scan for filenames under a big dir

This should be in the basic or for dummies forum.
Did you check the manpage for find?

find $dir -name $pattern -exec grep -l $string {} \;