View Full Version : Finding text on webpages
deltaned
04-26-2004, 05:52 AM
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?
Dixiesys
04-26-2004, 09:15 AM
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"
ProWebUK
04-26-2004, 09:58 AM
grep -rn "text to search for" /path/to/file/or/directory/
Chris
Powered by vBulletin™ Version 4.0.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.