一、atd与crond的区别
1、运行方式不同,at只运行一次,而crontab则是循环运行;
2、依赖的服务不同,at对应的服务时atd,而crontab对应的服务时crond;
3、at一般是临时任务,而crontab一般是周期性任务。
二 指定在2023/08/26 09:00将时间写入testmail.txt文件中
三.指定在每天凌晨4:00将该时间点之前的系统日志信息备份到根目录下(/var/log/messages ),备份后日志文件名显示格式logfileYY-MM-DD HH-MM
[root@server ~]# crontab -e
crontab: installing new crontab 00 4 * * * cp /var/log/messagess /logfile`date %F%T`; echo > /var/log/messagess
完成
四 在当前主机添加两块网卡,将两块网卡绑定实现网卡冗余操作。
[root@localhost ~]# nmcli connection add type team ifname team0 con-name team0 config '{"runner": {"name": "activebackup"} }'
Connection 'team0' (117891c0-a827-4676-bdab-bfb06fa55042) successfully added.
[root@localhost ~]# nmcli connection add type team-slave con-name team0-port1 ifname ens224 master team0
Connection 'team0-port1' (4245afa6-ab1b-4a3d-abe3-c0878ec86b4b) successfully added.
[root@localhost ~]# nmcli connection add type team-slave con-name team0-port2 ifname ens256 master team0
Connection 'team0-port2' (55ac192f-1000-4802-b638-640fe4b54946) successfully added.
[root@localhost ~]# nmcli connection up team0-port1
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/9)
[root@localhost ~]# nmcli connection up team0-port2
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/10)
[root@localhost ~]# nmcli connection show
NAME UUID TYPE DEVICE
ens160 73d65e5a-1080-413f-88a4-40c84612af14 ethernet ens160
team0 117891c0-a827-4676-bdab-bfb06fa55042 team team0
team0-port1 4245afa6-ab1b-4a3d-abe3-c0878ec86b4b ethernet ens224
team0-port2 55ac192f-1000-4802-b638-640fe4b54946 ethernet ens256