`

How to control the jobs with shell?

阅读更多

There are 3 commands to contol jobs.

1. Ctrl + Z
2. bg & fg
3. kill
4. jobs

For example,

1. robert@debianlaptop:~$ emacs

[1]+  Stopped                 emacs

2. robert@debianlaptop:~$ fg %1
emacs

[1]+  Stopped                 emacs

. robert@debianlaptop:~$ bg %1
[1]+ emacs &

3. robert@debianlaptop:~$ jobs
[1]+  Running                 emacs &

4. robert@debianlaptop:~$ kill %1

 

The processes stopped by Ctrl + Z becom the jobs.

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics