CentOS Stream 9でcronのログを確認する方法
環境
# cat /etc/redhat-release
CentOS Stream release 9
方法1
less /var/log/cron
lessコマンドでcronのログを確認します。
方法2
tailを使用してログの後ろ10行を常に表示します。
# tail -n 10 -f /var/log/cron Jul 3 19:01:03 localhost anacron[3415]: Jobs will be executed sequentially Jul 3 19:30:03 localhost anacron[3415]: Job `cron.daily' started Jul 3 19:30:04 localhost anacron[3415]: Job `cron.daily' terminated Jul 3 19:50:03 localhost anacron[3415]: Job `cron.weekly' started Jul 3 19:50:03 localhost anacron[3415]: Job `cron.weekly' terminated Jul 3 19:50:03 localhost anacron[3415]: Normal exit (2 jobs run) Jul 3 20:01:02 localhost CROND[5087]: (root) CMD (run-parts /etc/cron.hourly) Jul 3 20:01:02 localhost run-parts[5087]: (/etc/cron.hourly) starting 0anacron Jul 3 20:01:03 localhost run-parts[5087]: (/etc/cron.hourly) finished 0anacron Jul 3 20:01:03 localhost CROND[5086]: (root) CMDEND (run-parts /etc/cron.hourly)