1.atd和crond两个任务管理程序的区别
atd服务是用来执行at命令所产生的工作,并且是单一执行的例行工作,只执行一次就结束。
crond服务是用来执行crontab命令产生的工作,是循环执行的例行工作,一周执行一次。
2.指定在2022/08/26 09:00将时间写入testmail.t
touch /testmail.txt #创建文件
at 9:00 2022-08-26 #在2022年8月26日进行的操作
at: refusing to create job destined in the past #时间已过
[root@localhost ~]# at 21:00 #在21:00进行的操作
warning: commands will be executed using /bin/sh
at> date > /testmail.txt
at> <EOT>
3.指定在每天凌晨4:00将该时间点之前的系统日志信息备份到个目录下(/var/log/messages ),备份后日志文件名显示格式logfileYY-MM-DD HH-MM
crontab -e 进入配置文件
0 4 * * * scp /var/log/messages /`date "+logfile%F%R"`
4.在当前主机添加两块网卡,将两块网卡绑定实现网卡冗余操作
在开机之前添加两台适配器
ip a 查看新网卡有ip没有
nmcli connection add type team ifname team0 con-name team0 config '{"runner": {"name": "activebackup"} }' 创建虚拟网卡team0
nmcli connection add type team-slave con-name team0-port1 ifname ens37 master team0
将网卡37设置为虚拟网卡的从网卡
nmcli connection add type team-slave con-name team0-port2 ifname ens38 master team0
将网卡38设置为虚拟网卡的从网卡
nmcli connection up team0-port1激活
nmcli connection up team0-port2 激活
nmcli connection show 查看网卡是否冗余