Notice: Trying to get property of non-object in /home/wpcmsnin/snippets.wpcms.ninja/wp-content/plugins/wordpress-seo/frontend/schema/class-schema-utils.php on line 25

Delete a files contents through bash

,

So I was looking for a way to automatically overwrite a log file utilizing the command prompt and a cron job.  So this is how it can be accomplished.

By adding this to the crontab it will overwrite the file at whatever interval you set.  Very useful if a sites log file is getting filled up with warnings.

Skills

Posted on

August 27, 2015

Submit a Comment

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