GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   search in logs question (https://gfy.com/showthread.php?t=505638)

alex79 08-19-2005 05:04 AM

search in logs question
 
how do i search for a text in log files from my server?
the log files are very big and i can't open each file and search for that text :(

Gungadin 08-19-2005 05:24 AM

Unix/linux/bsd/etc:

>grep -i -r "your stuff here" /path/to/your/access_log

The -i is case INsensitive
The -r is recursive
(You may not need either)

Hope this helps...

PussyTeenies 08-19-2005 06:49 AM

Quote:

Originally Posted by Gungadin
Unix/linux/bsd/etc:

>grep -i -r "your stuff here" /path/to/your/access_log

The -i is case INsensitive
The -r is recursive
(You may not need either)

Hope this helps...

if its freebsd instead of "-r" you can also use "-R"

and for tgz archives use
Code:

zcat archive_file.tgz | grep -R -i "your stuff"

alex79 08-19-2005 07:17 AM

Quote:

Originally Posted by Gungadin
Unix/linux/bsd/etc:

>grep -i -r "your stuff here" /path/to/your/access_log

The -i is case INsensitive
The -r is recursive
(You may not need either)

Hope this helps...


instead of " /path/to/your/access_log" can i enter a directory to search all files from that directory?


All times are GMT -7. The time now is 02:34 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123