3. System delay and timing mechanism **************
# # 1.at Delay # #
At time
At> Action
At> Ctrl+d
At> <EOT>
At-l Viewing wait tasks
ATRM Task Number Delete task
Example: Setting a delay task to create a new file in/mnt at 2:03 test
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/89/8B/wKiom1gXCMvz9vnDAAB_V_jq3S0091.png "style=" float: none; "title=" 1.PNG "alt=" Wkiom1gxcmvz9vndaab_v_jq3s0091.png "/>
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/89/89/wKioL1gXCMzihqdAAACGlY3AJ7Q029.png "style=" float: none; "title=" 2.PNG "alt=" Wkiol1gxcmzihqdaaacgly3aj7q029.png "/>
When an action is executed with output
The output is sent to the task initiator as a message
Mail View message
Example: Writing script output hello.xx! Execute the script at 2:10 ticks
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/89/89/wKioL1gXCdGCswFdAAB-ZKZVjyc721.png "style=" float: none; "title=" 1.PNG "alt=" Wkiol1gxcdgcswfdaab-zkzvjyc721.png "/>
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/89/89/wKioL1gXCdGSF9caAAAQSMJVmBk594.png "style=" float: none; "title=" 2.PNG "alt=" Wkiol1gxcdgsf9caaaaqsmjvmbk594.png "/>
As a result, the results do not appear on the interactive interface but are sent to the task performer by mail
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/89/8B/wKiom1gXCdKQAI45AACkUsa2XJs290.png "style=" float: none; "title=" 3.PNG "alt=" Wkiom1gxcdkqai45aackusa2xjs290.png "/>
at Black and white list of users
/etc/at.deny blacklist, default exists
/etc/at.allow Whitelist, default does not exist, once there is a blacklist invalidation
And all ordinary users can perform at the power is forbidden only users in this file can perform at
example: On the Blacklist to test whether the student user can use the AT command by adding the student user
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/89/8B/wKiom1gXCw-Av2K9AADSJ9FNzSc348.png "title=" 2.PNG " Style= "Float:none;" alt= "Wkiom1gxcw-av2k9aadsj9fnzsc348.png"/>
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/89/89/wKioL1gXCw3DcTcQAAAQ_iXK1Kk758.png "title=" 1.PNG " Style= "Float:none;" alt= "Wkiol1gxcw3dctcqaaaq_ixk1kk758.png"/>
add to the white list Add student user, test student user can use at command
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/89/8B/wKiom1gXCxSiLfhRAADDeyw-te8956.png "title=" 4.PNG " Style= "Float:none;" alt= "Wkiom1gxcxsilfhraaddeyw-te8956.png"/>
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/89/89/wKioL1gXCw_gYiwKAAAQdFaH1iM466.png "style=" float: none; "title=" 3.PNG "alt=" Wkiol1gxcw_gyiwkaaaqdfah1im466.png "/>
Once the whitelist is present, the blacklist expires
# 2. Recurring Tasks # #
Command mode initiated:
Crontab-u USERNAME-E
MM HH dd mm WW
MM/2 every two minutes
HH1-HH2 HH1 to Hh2 point in time
HH1,HH2 HH1 Point in time and Hh2 point in time
Crontab-l show tasks that are not in progress
Crontab-u username-r Delete all tasks for user
Example: New recurring task execute output "Hello" every Minute
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/89/8B/wKiom1gXDROR-7e6AAA19FSSmRA287.png "title=" 3.PNG " Style= "Float:none;" alt= "Wkiom1gxdror-7e6aaa19fssmra287.png"/>
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/89/89/wKioL1gXDRLC7XIVAAAampiBPm0009.png "title=" 2.PNG " Style= "Float:none;" alt= "Wkiol1gxdrlc7xivaaaampibpm0009.png"/>
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/89/89/wKioL1gXDRGiOtNOAAAWV2pPjTc672.png "title=" 1.PNG " Style= "Float:none;" alt= "Wkiol1gxdrgiotnoaaawv2ppjtc672.png"/>
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/89/8B/wKiom1gXDRWzZtQoAAEk4SzuYI4471.png "title=" 4.PNG " Style= "Float:none;" alt= "Wkiom1gxdrwzztqoaaek4szuyi4471.png"/>
File mode initiated:
Vim/etc/cron.d/filename
MM HH dd mm WW username action
Or:
Echo ' MM hh DD MM WW username action ' >/etc/cron.d/filename
Example: initiating a task separately in the above two ways to create a new 5 file in/mnt
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/89/89/wKioL1gXDirjHgC1AAGCl3jJvxQ292.png "title=" 7.PNG " Style= "Float:none;" alt= "Wkiol1gxdirjhgc1aagcl3jjvxq292.png"/>650) this.width=650; src= http://s2.51cto.com/ Wyfs02/m02/89/8b/wkiom1gxdikcegafaaaiw7tarxq081.png "style=" Float:none; "title=" 6.PNG "alt=" Wkiom1gxdikcegafaaaiw7tarxq081.png "/>
Black and white list of cron users
/etc/cron.deny blacklist, default exists
/etc/cron.allow Whitelist, default does not exist, once there is a blacklist invalidation
And all ordinary users can execute Crontab's power is forbidden only users in this file can perform crontab
Note:
If a file is written to a user who does not perform the crontab permission, the user action can still be executed, because the user does not perform the crontab action, the action can still be executed
# 3. System temp File Management # #
Vim/usr/lib/tmpfiles.d/*.conf
Type filename Perm user group time
Example: D/mnt/westos 1777 root root 5
The shortest possible file created in this directory is 5s
Systemd-tmpfiles--create/usr/lib/tmpfiles.d/*
Systemd-tmpfiles--clean/usr/lib/tmpfiles.d/*
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/89/89/wKioL1gXD2qwHz3NAAELzTmYFiI621.png "title=" 9.PNG " alt= "Wkiol1gxd2qwhz3naaelztmyfii621.png"/>650) this.width=650; src= http://s1.51cto.com/wyfs02/M01/89/8B/ Wkiom1gxdircpvoxaaadjp-kxp8319.png "title=" 8.PNG "style=" Float:none; "alt=" wkiom1gxdircpvoxaaadjp-kxp8319.png "/ >
Linux note 2-3 system delay and timing mechanism