Finding text on webpages

deltaned

Verified User
Joined
Jan 23, 2004
Messages
95
Hi,

Is it posible to start with a grep commando searching all public_html files fore some text or links?

Iff yes, what command do i need?
 
There's a couple ways of going about it, if you're pretty sure what you're looking for has been around on the server a day or so, you can use locate (on redhat):

locate public_html | xargs -n 50 grep -ls "text"

This would print out a list of filenames containing "text"

If you think what you want is pretty new and the file name might not be in the locate database yet (or you're not using redhat) then this should work:

find /home/*/domains/*/public_html/ | xargs -n 50 grep -ls "text"
 
Back
Top