Web Hosting Talk







View Full Version : Raw log file got too big, how to "restart it?"


look-closer
09-21-2001, 01:42 PM
The raw log file for one of my sites has the logs of the last week and a half and is now about 30 megs in size. How can I make the log restart itself so that everything in it right now gets deleted and it starts logging again from today and on? My other host automatically does this daily, so I was wondering what to do here?

Thanks in advance.

teck
09-21-2001, 02:02 PM
I believe you can just backup the file, delete it, then just "touch" the file again so it can start from scratch.

BlueBox
09-21-2001, 02:59 PM
you could also just cat an empty line into it

cat > log_file_name

then use Ctrl c to escape

should empty it - of course losing the data :)

Dylan
09-21-2001, 10:46 PM
Ye, delete it and restart Apache that's all there is to it.