How clear access log and error log
How clear access log and error log
Hi
Log of my server have big size, I want clear access log and error log in server, how do this?
Log of my server have big size, I want clear access log and error log in server, how do this?
Re: How clear access log and error log
I always do it like this, for example:
Don't know if there is any better way of achieving this, but it works.
Code: Select all
cat /dev/null > /var/log/exim/main.log
-
- Collaborator
- Posts: 783
- Joined: Mon May 11, 2015 8:43 am
- Contact:
- Os: CentOS 6x
- Web: apache + nginx
Re: How clear access log and error log
Maybe it's better to solve the errors in error log?
you can use
echo "" > /yourerrorlog
you can use
echo "" > /yourerrorlog
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: How clear access log and error log
Big logs signify a problem... it is always important to check why log is bloating so much
Re: How clear access log and error log
Yes, but it also can tell about a large number of requests -- popularity, downloaders (site cloners), ddos :)mehargags wrote:Big logs signify a problem... it is always important to check why log is bloating so much