access_log file

She has: 88 posts

Joined: Sep 2001

I have a gi-hugeeeee access_log file (1.2 gig) and I would like to know how to zero it out, e.g., get rid of all the data and start afresh. Since I don't know anything about server management, I was hoping someone could give me a lead on where to start.

TIA

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

if you don't care about the data in there, then just delete it and it should start over with a new file.

If you are using a unix/bsd machine, do a search for either logrotate or rotatelog. i think that was the program that you can set up in the cron files or soemthing to rotate the log files every set time. (ours does it each sunday, access_log becomes access_log.0 and access_log.0 becomes access_log.1, etc. it keeps 4 old weeks worth.)

-Greg

She has: 88 posts

Joined: Sep 2001

Thanks, Greg! I appreciate it!

mairving's picture

They have: 2,256 posts

Joined: Feb 2001

A large log file can impact perfomance since it takes a bit longer to access it. Is this the access log for the server or the http log.

She has: 88 posts

Joined: Sep 2001

It's whatever is feeding my Analog stats.

Goodness, Mark. I used to live in Lakeland, Bartlett and Raleigh!

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.