R roly Verified User Joined Nov 9, 2006 Messages 182 Nov 15, 2011 #1 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
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
scsi Verified User Joined Aug 19, 2008 Messages 4,531 Nov 15, 2011 #2 grep -i '127.0.0.1' /var/log/httpd/domains/*.log Replace 127.0.0.1 with the actual ip.
zEitEr Super Moderator Joined Apr 11, 2005 Messages 15,729 Location www.poralix.com Nov 16, 2011 #4 @scsi, why do you need -i when grepping an IP?
scsi Verified User Joined Aug 19, 2008 Messages 4,531 Nov 16, 2011 #5 Lol I am just used to always putting it there -i is not needed unless you are looking to ignore case...but not needed for numbers.
Lol I am just used to always putting it there -i is not needed unless you are looking to ignore case...but not needed for numbers.