`

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.

分享到:
评论

相关推荐

    csapp-shell-labcsapp-shell-labcsapp-shell-lab

    By completing this lab assignment, you will gain hands-on experience with the core concepts of process control and signaling, which are fundamental to understanding how modern operating systems manage...

    2009 达内Unix学习笔记

    各个 shell 可互相切换 ksh:$ sh:$ csh:guangzhou% bash:bash-3.00$ 一、注意事项 命令和参数之间必需用空格隔开,参数和参数之间也必需用空格隔开。 一行不能超过256个字符;大小写有区分。 二、特殊字符...

    Modern Operating Systems 3rd

    6. **The Shell:** The shell is a command-line interface that allows users to interact with the operating system. Shells provide scripting capabilities and facilitate automation of tasks. 7. **System ...

    hadoop_the_definitive_guide_3nd_edition

    The Hive Shell 413 An Example 414 Running Hive 415 Configuring Hive 415 Hive Services 417 viii | Table of Contents www.it-ebooks.info The Metastore 419 Comparison with Traditional Databases 421 Schema...

Global site tag (gtag.js) - Google Analytics