LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   sed problem (https://www.linuxquestions.org/questions/linux-newbie-8/sed-problem-748361/)

kazemipouya 08-18-2009 03:17 AM

sed problem
 
i run a script in crontab which remove some lines from apache log by sed every hour, after each script running, apache cannot log anymore and i should restart it!!
what is the problem !?

centosboy 08-18-2009 03:19 AM

Quote:

Originally Posted by kazemipouya (Post 3647643)
i run a script in crontab which remove some lines from apache log every hour, after each script running, apache cannot log anymore and i should restart it!!
what is the problem !?

which lines/how many lines are your removing, and why?

kazemipouya 08-18-2009 03:23 AM

i don't want to apache log visitors of specified folder, but i canot find solution so decide to
remove the lines of log which has that folder name in!!

Wim Sturkenboom 08-18-2009 03:30 AM

Just a guess. Apache keeps that file open and when you remove stuff, the file pointer that it uses is no longer correct.

Might be totally wrong however.

Same thing happens when you don't stop apache during a logrotate (from experience ;) )

kazemipouya 08-18-2009 03:37 AM

so, what is the solution, how can i get rid of logging about the folder !?
is there a way to filter urls from apache logging or maybe awstats processing?


All times are GMT -5. The time now is 05:44 AM.