Program job management-background operation management

Source: Internet
Author: User
Program job management-background operation management 1. concept prospects: the environment in which you can control and issue commands is called foreground. Background: jobs that can operate on your own, you cannot use [ctrl] + c to terminate the job. you can use bg/fg to call the job. www. 2CT... program job management-background operation management 1. concept prospects: the environment in which you can control and issue commands is called foreground. Background: jobs that can operate on your own, you cannot use [ctrl] + c to terminate the job. you can use bg/fg to call the job. programs in the www.2cto.com background can be paused or running. System Background: if it is a background, it will be interrupted when you exit. if it is a background of the system, it can also run when you exit the terminal. 2. directly drop the command into the background and 'execute '. Simply Add & at the end of the command, as shown in [root @ www ~]. # Tar-zpcvf/tmp/etc.tar.gz/etc>/tmp/log.txt 2> & 1 & 3. throw the 'current 'job to the background and 'pause ': [ctrl]-z4. observe the current background working status: jobs [root @ www ~] # Jobs [-lrs] option and parameter: www.2cto.com-l: in addition to listing the job number and command string, the PID number is also listed;-r: Only list jobs in the background run; -s: Only list jobs that are being paused in the background. 5. get the background work to the foreground: fg [root @ www ~] # Fg % jobnumber option and parameter: % jobnumber: jobnumber is a work number (number ). Note that % is dispensable! [1] + Stopped + indicates that if fg is input directly, this 6 is used to make the work in the background state operational: bg % work number 7. management background: kill [root @ www ~] # Kill-signal % jobnumber [root @ www ~] # Kill-l option and parameter:-l: the lower case of L. Which of the following signals can be used by kill? Signal: what kind of instruction does it mean to give the subsequent job ?? # Man 7 signal:-1: re-read the parameter configuration file (similar to reload);-2: represents the same action as entering [ctrl]-c on the keyboard; -9: force delete a job immediately.-15: terminate a job as a normal program. It is different from-9. The default number next to kill will be PID. if you want to manage bash's work control, you have to add % number, so pay special attention to this! 8. run it offline, that is, put it in the system background [root @ www ~] # Nohup [commands and parameters] <= working in the foreground of the terminal [root @ www ~] # Nohup [commands and parameters] & <== directly enter nohup in the background of the terminal to query the currently executed
 
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.