① scripting
operation error, the server will send regular e-mail, directory / var / mail / below, leading to an increase small files affect server performance, the above additional error is empty, also for this purpose
sed -i 's/^MAILTO=root/MAILTO=""/' /etc/crontab
② run the script
chmod u+x AutoSyncTime.sh
./AutoSyncTime.sh
或者
bash AutoSyncTime.sh
Note: The name of the custom script
③ script Description of content
# 编辑/etc/crontab文件
vim /etc/crontab
#替换格式
's/^
#替换的目标对象
MAILTO=root
#替换后的值等于什么
MAILTO=""