How to clear access.log file

 
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions
View previous topic :: View next topic  
Author Message
PWD
-


Joined: 04 Jan 2005
Posts: 34
Location: trying to conquer these fears I thought were GONE

PostPosted: Wed Jul 06, 2005 5:32 pm    Post subject: How to clear access.log file Reply with quote

I remember seeing a question posted on how to clear the access.log file and can no longer find it using 'search'.

Can anyone tell me how to clear my access.log file the CORRECT way?

Forever Grateful,

PWD
_________________
if (my($_GRATITUDE = 0)) {
kick_me(in the head);
}
Back to top View user's profile Send private message Send e-mail Visit poster's website
Moxxnixx
-


Joined: 21 Jun 2003
Posts: 1226
Location: Florida

PostPosted: Wed Jul 06, 2005 5:45 pm    Post subject: Reply with quote

Easiest way is to stop the server, delete the file, then restart the server.
A new one will be automatically created.

Aprelium, a "clear log" option within the console would be nice to have. (hint, hint)
Back to top View user's profile Send private message Visit poster's website
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Wed Jul 06, 2005 6:39 pm    Post subject: Reply with quote

You could write a batch script that can do this for you. Their is also a batch
script that Anonymoose wrote that can split your log depending on the type
of keyword , I provide an example at the bottom on splitting a log.

Anonymoose's Log Splitting script
http://www.aprelium.com/forum/viewtopic.php?p=28029#28028

Note: You could use keywords such as jul/2005 to split the log by month.
Here's an example of splitting the entire month of july into a new file. :-)

Batch Code Example:
Code:

cd "C:\Program Files\Abyss Web Server\log"
find /i "jul/2005" access.log > access_jul05.log


Sincerely , TRUSTpunk


Last edited by TRUSTAbyss on Wed Jul 06, 2005 7:01 pm; edited 1 time in total
Back to top View user's profile Send private message Visit poster's website
PWD
-


Joined: 04 Jan 2005
Posts: 34
Location: trying to conquer these fears I thought were GONE

PostPosted: Wed Jul 06, 2005 7:00 pm    Post subject: Reply with quote

Wow! Thank you for the quick and concise responses!

As always,

Forever Grateful,

PWD
_________________
if (my($_GRATITUDE = 0)) {
kick_me(in the head);
}
Back to top View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group