Linux learning notes in the backstage process (AT and &)

xiaoxiao2021-03-06  41

Linux Learning Notes Backstand Process (AT and & &) 3.2 At commands allow users to submit jobs to the cron daemon to operate later. This later may be 10 min or a few days later, if you want to be in a month or longer, it is best to use a crontab file to send all the output of the job to the user in the form of an email unless you output it. Redirect, most cases are re-direction to a file.

3.2.1 Using AT to submit a command or script There are several different forms using the AT submission job, and the AT command prompt can also be used in a manner. Generally, when submitting a system command submitted, use the AT command prompt, and use the command line mode when submitting the shell script. 3.2.2 Submission of jobs

AT -L3.2.3 Clear a job ATRM [Job NO] or At -R [Job NO]

3.3 & Command When a job is running at the front desk, the terminal is occupied by the job, and when it runs a job in the background, it will not occupy the terminal. 3.3.1 Submit the commands for the background, Find / etc -name "srm.conf" -Print> Find.dt 2> & 1 & Submit will give a system process number

3.4 Nohup Command If you are running a process, and you think that the process will not end when the account is launched, then you can use the Nohup command, which continues to run the corresponding process after you exit the account. Nohup is the meaning of NO HANG UP.

Small knot: The main introduction is the main operation of the background, and sometimes we need a lot of changes to large files, or perform some complex queries, which is best to execute when the system load is relatively low. Create a regular cleaning log file or complete the script to complete other special work, this only needs to be submitted. You can run every night without your intervention. Just look at the corresponding script log.

转载请注明原文地址:https://www.9cbs.com/read-66699.html

New Post(0)