Exercise Need Accomplish Following 1 Turn Daemon Cron Logging Features 2 Set Daemon Log Er Q37115617

In this exercise you need to accomplish the following:

1) Turn on the daemon and cron logging features.

2) Set the daemon log to ‘error’ and the cron log to ‘debug’status.

3) create a script that rotates these logs every day and placethem in the following directories:

a) /var/log/cron/$year/$month/$today’sDate-Cron.log

b) /var/log/daemon/$year/$month/$today’sDate-Daemon.log

4) If the year (2019) or month (04) doesn’t exist, then createit

5) Zero out the log of both of these from their original source.example.

cat /dev/null > /var/log/cron.log or daemon.log

6) Put an entry into root’s crontab that will accomplish thisfeat every day at 00:01 AM

Please provide the code for the script (including comments) andthe entry into

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.