crazyaboutlinux

Well-Known Member
Nov 3, 2007
939
1
66
Hi,

there are so many files in directory public_html with different ext e.g. .html , .htm , .php & much more.

now i want to find particular word in all html (*.html)files & get list of that files.

i have randomly checked 4-5 .html pages , 4-5 .htm pages & 4-5 .php pages & i have found .cn:8080 named virus scripts in those files, there more than 5000 files including .php .htm .html

I hope you guys understand what i meant to say !

Thanks!

Regards,
Nilesh
 

Kevinfrom

Well-Known Member
Jan 18, 2008
47
1
56
From command line you can use the grep command to search thru files.

man grep

grep 8080 /home/*/public_html

or

find /home/*/public_html -type f |xargs grep 8080

You can also use other commands (awk, sed) to remove these files or lines from the files.
 

madaboutlinux

Well-Known Member
Jan 24, 2005
1,051
2
168
Earth
Hi,

there are so many files in directory public_html with different ext e.g. .html , .htm , .php & much more.

now i want to find particular word in all html (*.html)files & get list of that files.

i have randomly checked 4-5 .html pages , 4-5 .htm pages & 4-5 .php pages & i have found .cn:8080 named virus scripts in those files, there more than 5000 files including .php .htm .html

I hope you guys understand what i meant to say !

Thanks!

Regards,
Nilesh
Your own duplicate thread ;)..

find word in the files & search : Hosting Security and Technology : Web Hosting Talk