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