O'Reilly logo

Practical UNIX by Steve Moritsugu - DTR Business Systems

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Managing Background Jobs

UNIX is a multitasking operating system. This means that, in general, you can start more than one job, and all will run concurrently. Your station is not tied up waiting for them to finish. You can even specify sequences of jobs so that one job will not start until the previous job has completed.

Starting Background Jobs

To start a job in the background, simply end the UNIX command with a space and then an ampersand (&), as shown in this example:

$ make acmesys > acme.log 2>&1 &
27903
$

Here’s a breakdown of the parts of that command:

  • make is a command that can take a long time to complete; therefore, you might run it in the background so that it does not tie up your station.

  • > acme.log redirects the output from make ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required