Jump to content
  • We need you!

    You must register to discover all the features of our community!

Clear all log / automatic

Recommended Posts

Posted (edited)

Hi Devs

Google translate

Here's a tutorial to automatically clear all your server logs.



Create crontab user root

crontab -e


click "insert" to keyboard and paste


*	*	*	*	*	/bin/sh /usr/home/etcetcetc/game/clear.sh


With this command you will clear your log in one minute.



Example time crontab:

Linux na Web - Como agendar tarefas no Linux com o Crontab



and press ESC and : and  wq = :wq and press enter

Example screen:


No need to restart ok..

Obs: command

List crontab: # crontab -l

edit crontab: # crontab -e

comment crontab (stop crontab) : comment (#)

#*    *    *    *    *    /bin/sh /usr/home/etcetcetc/game/clear.sh

Download my script clear.sh
edit the files to your directory..

Credit: ByLost



Edited by ByLost (see edit history)
Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.