Categories
Development Ubuntu 16.04 Server

How to Clear Error & Access Logs on Ubuntu 16.04 Apache Server

Here is an example of the terminal commands to clear error logs and access logs. Remember to update the file paths to the location of your error/access log/s.

sudo bash -c ‘echo > /var/www/html/logs/error.log’
sudo bash -c ‘echo > /var/www/html/logs/access.log’

By Andy Corby

Hi, I'm Andy and I am a Digital Marketer and Full Stack Web Developer, with a BA (Honours) Business & Finance Degree (2:1) and 10+ Years Experience in Marketing and Development.

Leave a Reply

Your email address will not be published. Required fields are marked *

four × five =