table of Contents
Running in the background
achieve
nohup [命令] > [输出信息文件] 2>&1 &
2> & 1 parsed
2> & 1 is to redirect standard error to standard output, standard output here has been redirected to the output file, standard error is about to be output to the output file.
Related Commands
jobs
Display tasks performed under the current terminal
jobs [参数]
parameter | effect |
---|---|
-l (L lowercase) | PID numbers listed in the process. |
-n | List only the last notice changed the course of the state. |
-p | List only the process PID number. |
-r | Running process list only. |
-s | List only stopped the process. |
ps
Display process information
ps [参数]
parameter | effect |
---|---|
-A | Show all processes. |
USER | Owner user ID. Process. |
%CPU | To CPU utilization expressed as a percentage |
%MEM | Expressed as a percentage to memory usage |
START | Point of time the process started. After a 24 day, then a day. |
kill
end process
kill [参数]
parameter | effect |
---|---|
Task No.% | Press the end of the process task number |
Process ID | Press the end of the process process ID |
fg
The task to the foreground
fg %任务号
&
The background process
Ctrl + z
You can command being executed in a foreground into the background, and paused.
Ctrl + c
Termination reception command.