Unit three of the second book
1. System Delay Task Initiation command
[[email protected] mnt]# at 11:03
at> touch/mnt/file{1..10} # #要执行的命令
at> <EOT>< Press ctrl+d> # #任务发起
Job 2 at Sat Nov 7 11:03:00 2015
650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/91/B4/wKiom1j3h0vC9t-nAAAXfBUG3tw485.jpg "title=" 36020170419235012603.jpg "alt=" Wkiom1j3h0vc9t-naaaxfbug3tw485.jpg "/>
[email protected] mnt]# at-l # #查看任务列表
2 Sat Nov 7 11:03:00 a root
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M01/91/B2/wKioL1j3h1aDtzqPAAAPbNMVZYQ723.jpg "title=" 36020170419235021520.jpg "alt=" Wkiol1j3h1adtzqpaaapbnmvzyq723.jpg "/>
[email protected] mnt]# ATRM 2 # #删除编号为2的人物
650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/91/B3/wKioL1j3h5WC_-eVAACgsviLkUg401.jpg "title=" 36020170419235115274.jpg "alt=" Wkiol1j3h5wc_-evaacgsvilkug401.jpg "/>
[email protected] mnt]# at Now+1min # #任务延迟一分钟执行
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M00/91/B3/wKioL1j3h6GCsLTBAAAYjVYvoZA795.jpg "title=" 36020170419235134984.jpg "alt=" Wkiol1j3h6gcsltbaaayjvyvoza795.jpg "/>
650) this.width=650; "src=" https://s2.51cto.com/wyfs02/M01/91/B4/wKiom1j3iD2QBsPLAADjeKQXDsc626.jpg "style=" float : none; "title=" 36020170419235250781.jpg "alt=" Wkiom1j3id2qbsplaadjekqxdsc626.jpg "/>
650) this.width=650; "src=" https://s2.51cto.com/wyfs02/M01/91/B3/wKioL1j3iD3gdZj9AAAiDc9MyrU357.jpg "style=" float : none; "title=" 36020170419235404233.jpg "alt=" Wkiol1j3id3gdzj9aaaidc9myru357.jpg "/>
Use Control for 3.at commands
/etc/at.deny # #默认存在系统中, users who appear in this list are forbidden
Test # #禁止test执行at
/etc/at.allow # #默认在系统中不存在,
# #但是当此文件存在时,
# # #deny文件失效,
#并且所有普通用户能执行at的权力被禁止, only users in this file can perform an at
Student # #系统中的普通用户只有student可以使用at
650) this.width=650; "src=" https://s4.51cto.com/wyfs02/M01/91/B3/wKioL1j3iJuwbaGKAAAPP3XhDtg313.jpg "style=" float : none; "title=" 36020170419235532699.jpg "alt=" Wkiol1j3ijuwbagkaaapp3xhdtg313.jpg "/>
650) this.width=650; "src=" https://s4.51cto.com/wyfs02/M02/91/B4/wKiom1j3iJvjyCcaAAAZ--PGTj8531.jpg "style=" float : none; "title=" 36020170419235537438.jpg "alt=" Wkiom1j3ijvjyccaaaaz--pgtj8531.jpg "/>
650) this.width=650; "src=" https://s4.51cto.com/wyfs02/M02/91/B3/wKioL1j3iJuTl798AABz5mTQ10k920.jpg "style=" float : none; "title=" 36020170419235553343.jpg "alt=" Wkiol1j3ijutl798aabz5mtq10k920.jpg "/>
4. Schedule recurring Tasks
Initiation Mode 1
Crontab
- e # #编辑定期任务
- L # #显示定期任务
- R # #删除定期任务
crontab format
minutes hours Day month week
minutes /numbers # #每隔几分钟, etc., hours, days, months, weeks apply
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/91/B3/wKioL1j3iUKzAgs0AAAYLX1XliQ924.jpg " title= "36020170419235636967-copy. jpg" style= "float:none;" alt= "wkiol1j3iukzags0aaaylx1xliq924.jpg"/>
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M00/91/B4/wKiom1j3iYnwrZbEAAA50OlH0h0671.jpg "title=" 36020170419235729186-copy. jpg "alt=" wkiom1j3iynwrzbeaaa50olh0h0671.jpg "/>
650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M00/91/B3/wKioL1j3iUPCR8S1AAAbNYf4pYY343.jpg "style=" float : none; "title=" 36020170419235735264.jpg "alt=" Wkiol1j3iupcr8s1aaabnyf4pyy343.jpg "/>
650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M01/91/B4/wKiom1j3iUOxALoqAAAqYZihLtY654.jpg "style=" float : none; "title=" 36020170419235806884.jpg "alt=" Wkiom1j3iuoxaloqaaaqyzihlty654.jpg "/>
Initiation Mode 2
Vim/etc/cron.d/ps # #ps文件名称任意
minutes hours Day month week user commands
650) this.width=650; "src=" https://s4.51cto.com/wyfs02/M02/91/B4/wKiom1j3ivrTVP80AAASK1KhzaM151.jpg "style=" float : none; "title=" 36020170420000601044.jpg "alt=" Wkiom1j3ivrtvp80aaask1khzam151.jpg "/>
650) this.width=650; "src=" https://s5.51cto.com/wyfs02/M02/91/B3/wKioL1j3ivvx-p07AACp488iD8w216.jpg "style=" float : none; "title=" 36020170420000608520.jpg "alt=" Wkiol1j3ivvx-p07aacp488id8w216.jpg "/>
4.crontab Usage Limits
/etc/cron.deny # #默认存在系统中, users who appear in this list are forbidden
Test # #禁止test执行crontab
/etc/cron.allow # #默认在系统中不存在,
# #但是当此文件存在时,
# # #deny文件失效,
#并且所有普通用户能执行crontab的权力被禁止, only users in this file can perform crontab
Student # #系统中的普通用户只有student可以使用crontab
650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M01/91/B3/wKioL1j3i4fRviq1AACYFhXtrCw292.jpg "title=" 36020170420000638852.jpg "alt=" Wkiol1j3i4frviq1aacyfhxtrcw292.jpg "/>
5. System Temp File
Vim/usr/lib/tmpfiles.d/xxx.conf
type name Permissions All All Groups time of existence (S M d)
Systemd-tmpfiles --create/usr/lib/tmpfiles.d/xxx.conf # #创建
Systemd-tmpfiles --clean /usr/lib/tmpfiles.d/xxx.conf # #清理
650) this.width=650; "src=" https://s5.51cto.com/wyfs02/M00/91/B4/wKiom1j3jBmxcGCfAACTlrK3x7M077.jpg "style=" float : none; "title=" 36020170420000903922.jpg "alt=" Wkiom1j3jbmxcgcfaactlrk3x7m077.jpg "/>
650) this.width=650; "src=" https://s4.51cto.com/wyfs02/M00/91/B3/wKioL1j3jBrBXzTFAADa0zjIHw4622.jpg "style=" float : none; "title=" 36020170420000921953.jpg "alt=" Wkiol1j3jbrbxztfaada0zjihw4622.jpg "/>
650) this.width=650; "src=" https://s5.51cto.com/wyfs02/M01/91/B4/wKiom1j3jBrw6hrCAAErvSJ2OlE475.jpg "style=" float : none; "title=" 36020170420001003720.jpg "alt=" Wkiom1j3jbrw6hrcaaervsj2ole475.jpg "/>
650) this.width=650; "src=" https://s4.51cto.com/wyfs02/M01/91/B3/wKioL1j3jBrS6Lu4AAALQIb-ckc685.jpg "style=" float : none; "title=" 36020170420001037679.jpg "alt=" Wkiol1j3jbrs6lu4aaalqib-ckc685.jpg "/>
Linux Learning 134 Unit 3