In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to use Crontab logs under Linux", in daily operation, I believe many people have doubts on how to use Crontab logs under Linux, Xiaobian consulted all kinds of information, sorted out simple and easy to use operation methods, hope to answer "how to use Crontab logs under Linux" doubts helpful! Next, please follow the small series to learn together!
The/var/log/cron file stores cron's task execution records
The code is as follows:
cd /var/log/
ls -l cron*
You'll find that cron logs change every day
use
The code is as follows:
tail -f cron
To be able to view today's cron logs:
use
The code is as follows:
cat /etc/crontab
can see
MAILTO=root means that when a crontab command or task is executed, a record message will be generated and sent to the root user.
Check root's mail
The code is as follows:
[root@localhost cron]# cd /var/spool/mail
[root@localhost mail]# pwd
/var/spool/mail
[root@localhost mail]# ls
dee emperor mysql root rpc
[root@localhost mail]# tail -100 root
You can see that every command executed is sent to the user by mail,
Here you can see some cron related commands. It is mainly logged or under/var/log/cron.
At this point, on "how to use Linux under the Crontab log" learning is over, I hope to solve everyone's doubts. Theory and practice can better match to help everyone learn, go and try it! If you want to continue learning more relevant knowledge, please continue to pay attention to the website, Xiaobian will continue to strive to bring more practical articles for everyone!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.