[Chapter 5] 5.7 Job Control
Author: Daniel Gilly & the Staff of O'Reilly & Associates
Date: 1998-08-06T21:59:38Z

#

| Chapter 5 The C Shell |

## 5.7 Job Control

Job control lets you place foreground jobs in the background, bring background jobs to the foreground, or suspend (temporarily stop) running jobs. The C shell provides the following commands for job control. For more information on these commands, see "Built-in Commands" earlier in this section.

bg

  Put a job in the background.

fg

  Put a job in the foreground.

jobs

  List active jobs.

kill

  Terminate a job.

notify

  Notify when a background job finishes.

stop

  Suspend a background job.

CTRL-Z

  Suspend a foreground job.

Many job control commands take `jobID` as an argument. This argument can be specified as follows:

%n

  Job number `n`.

%s

  Job whose command line starts with string `s`.

%?s

  Job whose command line contains string `s`.

%%

  Current job.

%

  Current job (same as above).

%+

  Current job (same as above).

%-

  Previous job.

5.6 Built-in C Shell Commands |  | 5.8 Invoking the Shell