how to search all user log files at once for an ip address

roly

Verified User
Joined
Nov 9, 2006
Messages
182
hi

does anyone know of a way, such as a command or script to grep all user apache log files at once to search for a particular ip address?

any advice appreciated

thanks in advance
 
grep -i '127.0.0.1' /var/log/httpd/domains/*.log

Replace 127.0.0.1 with the actual ip.
 
Lol I am just used to always putting it there :P

-i is not needed unless you are looking to ignore case...but not needed for numbers.
 
Back
Top