LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 08-18-2009, 03:17 AM   #1
kazemipouya
LQ Newbie
 
Registered: Feb 2009
Posts: 8

Rep: Reputation: 0
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 !?

Last edited by kazemipouya; 08-18-2009 at 03:20 AM.
 
Old 08-18-2009, 03:19 AM   #2
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by kazemipouya View Post
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?
 
Old 08-18-2009, 03:23 AM   #3
kazemipouya
LQ Newbie
 
Registered: Feb 2009
Posts: 8

Original Poster
Rep: Reputation: 0
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!!
 
Old 08-18-2009, 03:30 AM   #4
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
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 )
 
Old 08-18-2009, 03:37 AM   #5
kazemipouya
LQ Newbie
 
Registered: Feb 2009
Posts: 8

Original Poster
Rep: Reputation: 0
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?

Last edited by kazemipouya; 08-18-2009 at 03:43 AM.
 
  


Reply

Tags
apache, log, sed


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
sed problem kranthikumar.gatta Linux - Newbie 3 07-09-2008 02:16 AM
sed problem... jong357 Programming 11 05-09-2007 12:27 AM
sed problem Hydrap Linux - General 3 03-30-2006 07:31 AM
a sed problem thanhVic Programming 5 03-02-2005 01:05 AM
Insert character into a line with sed? & variables in sed? jago25_98 Programming 5 03-11-2004 06:12 AM


All times are GMT -5. The time now is 08:30 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration