A. Shell supports role control and has the following commands: 1. command & amp; let the process run 2.jobs in the background view the process running in the background 3.fg% n let the process running in the background n to the foreground 4.bg% n let the process n to the background; PS: n is the process number viewed by jobs. b. http...
A. Shell supports role control and has the following commands:
1. command & run the process in the background
2. jobs view the processes running in the background
3. fg % n bring the processes running in the background to the foreground
4. bg % n let the process n go to the background;
PS: "n" indicates the process number viewed by jobs.
B. conversion of the following: http://blog.chinaunix.net/u/1604/showart_1079559.html
Fg, bg, jobs, &, ctrl z are all related to system tasks. although these commands are rarely used, they are also very practical.
1. & most frequently used
This command is used in a command and can be executed in the background.
II. ctrl z
You can put a command that is being executed on the foreground in the background and pause it.
III. jobs
View the number of commands currently running in the background
IV. fg
Move the commands in the background to the foreground to continue running.
If there are multiple commands in the background, you can use fg % jobnumber to call up the selected command. % jobnumber is the serial number (not pid) of the command being executed in the background found through the jobs command)
5. bg
Pause a command in the background to continue execution.
If there are multiple commands in the background, you can use bg % jobnumber to call up the selected command. % jobnumber is the serial number (not pid) of the command being executed in the background found by the jobs command)