find command

Hi,
I am using a `find` command to find all the files in the directory which contain the number 2392. The command is as follows:
find . -name *2392* -print

This outputs all the files, but I only need to find the files with .html extension and rename them. Is there a way to pipe the output of my "find" command to "ls" ?

Try this..

find . -name "*.html" -exec grep -l '2392' {} \;

The above code will display the file name. u can stick ur rename logic here.

hi
sorry my freind
it seems there is need for some more clarity in your question ,

ok what i under stood is u want to serach a file with pattern "2392" and a .html file ,
now so u want to rename that file to some thing else ?
or do you want to just list [ ls ] all the files

like the above reply you can do it

find . -type f -name "*2392*.html" |xargs ls -l

find . -type f -name "*2392*.html" -ls

the short one.