Jump to content

Clear All Log / Automatic Cron

Recommended Posts

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



Link to post
  • 7 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



Chatroom Rules


Join our Discord

A request for help = Shoutbox Ban

Be respectful & Respect the rules


  • 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.