How to enable log for damage on Linux

1641309728 How to enable log for damage on

If you are looking for malware damage problems, this is probably the best way to enable logging. Jack Wallen shows you how.

Cron is a time-based application in Linux that runs system operations and allows users to create tasks that are executed on a regular basis. Cron does simple things like empty the / tmp folder regularly, clean PHP sessions, run backups, and so much more.

But the only problem with damage is that there is no specific log out of the box. This can be a problem when creating your own damage works and you need to debug them.

Without a log, you may never know if that work was running. This happened to me recently, when I created two cronjobs to keep Google Drive in sync with local directory with rclone. I had no idea if the works were running, let alone comparing the packages. Fortunately, it is possible to enable damage logging.

Let's find out how.

Open a finish window on the Linux machine in which the damage works and issue the command:

sudo nano /etc/rsyslog.d/50-default.conf

In that file, look for the line that starts with #cons. *.

Remove the symbol # and then in the second column add:


Save and close the file.

Next, restart the syslog with the command:

 sudo systemctl restart rsyslog

At this point, you should now see the new log file /var/log/cron.log. If you do not see it immediately, it will appear the next time you run a damage operation.

You can then read through that file with the command less /var/log/cron.log and disturb any cronjobs that may or may not be running.


    See also


    Image: Jack Wallen

    Related Posts

    Deja una respuesta

    Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *


    We use cookies to ensure that we give the best user experience on our website. If you continue to use this site we will assume that you agree. More information