Command formatjobs [-LNPRS] [jobspec ...]Jobs-x command [args]Command parameters-LThe process ID of the additional display job.-NLists only the processes in which the state has changed.-POnly the process ID of the job is listed.-ROnly jobs with a running status are listed.-SOnly jobs that have a stopped state are listed.InstanceA) displays the process ID and stat
This article turns from http://www.ibm.com/developerworks/cn/linux/l-cn-nohup/I'm working on my own. Need to remotely connect to the company's development machine, when running the program on the development machine, once exiting the terminal will cause the running program is terminated, how to solve it?The answer is to let the program run in the background, not affected by the current terminal process.The
First, is most often usedThis is used at the end of a command, you can put this command in the background to executeTwo, CTRL + ZYou can put a command that is executing in the foreground in the background and pauseThird, JobsSee how many commands are currently running in the backgroundIv. FGMove commands in the background to the foreground to continue runningIf
Document directory
Content of this section:
Introduction
Background job
About job persistence
Create a background job
Add a new job to the queue
Default background Job Manager
Background job Storage
Configuration
Disable job execution
Hangfire Integration
If you need to speed up the execution of a script, you may need to use a background job. Background jobs can run multiple events in the script at the same timePowerShell is a single-threaded session and can only do one thing at a time. Background jobs can add additional Powe
Once you have called MsgBox, you are performing some of the Background processing jobs, such as counters or clocks ... And so on, will stop, until you respond to the MsgBox, everything will return to normal! Perhaps you do not want this, it may also cause some unnecessary mistakes!
To resolve this problem, you must use the Windows API to call the MessageBox Function, which uses the same methods, looks, and
Linux Task (Jobs) detailedAfter executing a command with the administrator, the command is moved to the background with CTRL + Z. Causes the root cannot be exited.Input command: ExitTerminal display: There is stopped jobs.Workaround:Method One, enter the command: JobsTerminal display: [1]+ Stopped vim/etc/network/interfaces >/home/leo/desktop/ip.txt (WD:/)KILL%1M
Linux Task (Jobs) detailedAfter executing a command with the administrator, the command is moved to the background with CTRL + Z. Causes the root cannot be exited.Input command: ExitTerminal display: There is stopped jobs.Workaround:Method One, enter the command: JobsTerminal display: [1]+ Stopped vim/etc/network/interfaces >/home/leo/desktop/ip.txt (WD:/)KILL%1M
What is Job management?"In the conduct of work management, in fact, each job is currently a subroutine of bash, which is related to each other." We can't manage Tty2 bash in the tty1 environment by job Control! "This concept you have to create first, after the introduction of the following example, you will clearly understand Luo!"Given that we have only one terminal interface, it is called the foreground (foreground) in the context where the cue bytes can appear, so that you can put the
commands under Linux to control task jobs executionThe following commands can be used to manipulate process tasks:PS Lists the processes that are running in the system;Kill sends a signal to one or more processes (often used to kill a process);Jobs lists the status of tasks that are started in the current shell environment, and if JOBSID is not specified, displa
What is Job management?"In the conduct of work management, the fact that every job is a child of bash at the moment, i.e., is related to each other." We can't manage Tty2 bash in the tty1 environment by job Control! "This concept should be created first, perhaps after the introduction of the example." You'll know what's going on.Because if we only have a terminal interface, the environment that allows you to operate in the presence of cue bytes is called the foreground (foreground). As with any
shell commands under Linux to control task jobs executionThe following commands can be used to manipulate process tasks:PS Lists the processes that are running in the system;Kill sends a signal to one or more processes (often used to kill a process);Jobs lists the status of tasks that are started in the current shell environment, and if JOBSID is not specified,
FG, BG, Jobs, , CTRL + Z are all related to system tasks, although these commands are largely not needed now, but they are also usefulA . is most often usedThis is used at the end of a command, you can put this command in the background to executeTwo. Ctrl + ZYou can put a command that is executing in the foreground in the background and pauseThree. JobsSee how m
the terminal.VII. termination of the process
Termination of the background process:
Method One:View the job number (assuming num) through the jobs command, and then execute the kill%num
Method Two:Use the PS command to view the job's process number (PID, assuming PID), and then execute the kill PID
Termination of the foreground process: Ctrl + C
Oth
Managing Shell JobsWhen moving jobs between the foreground and background, it could be useful to a overview of all current jobs. To get such a overview, use the jobs command. As can see in Table 9.2, this command gives an overview of all jobs currently running as a
in the job, showing the stopped job. Some of the different parameters used by the jobs command:The plus and minus signs in the output. Jobs with a plus sign are considered default jobs. If the command line does not specify a job number, it should be the job referenced by any job control command. A job with a minus sign is the job that will become the default job
One, the following commands can be used to manipulate process tasks:PS Lists the processes that are running in the system.kill sends a signal to one or more processes (often used to kill a process).Jobs Lists the status of the tasks that are started in the current shell environment and displays all active task status information if jobsidis not specified, or if a task is reported to be terminated (that is, the status of the task is marked as Terminate
Common commands for managing jobs in Linux1 put the command or script in the background to run#命令 egRPM-IVH zlib**.rpm ./run.sh 2 pausing a command to the backgroundCTRL + Z3 Viewing background commands#jobsParameters:-L: The PID is listed in addition to the job number listed-r: Lists jobs running only in the
Tags: simple operation of the Linux jobs commandJob is divided into foreground job and background jobThe foreground job (foreground) is started through the terminal, and the boot will always occupy the terminal. such as VIM, CPBackground jobs (background) can be started thro
After executing a command with the administrator, I use CTRL + Z to transfer the command to the background day. Cause I can't quit root.Input command: LogoutTerminal display: There is stopped jobs.Workaround:Input command: JobsTerminal display: [1]+ Stopped vim/etc/network/interfaces >/home/leo/desktop/ip.txt (WD:/)See for a long while did not see the process of PID, no way to kill.Continue to enter command: jobs
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.