Checking Job Status with jobs

Checking Job Status with jobs

Occasionally, you may have multiple jobs running or suspended and need a quick update about the jobs' status. Using jobs, you can find out whether a job is running, stopped, or waiting for input, as shown in Code Listing 9.6.

Code Listing 9.6. Viewing jobs lets you know which jobs you have suspended and their status.

[ejr@hobbes ejr]$ jobs [1]- Running   ftp & [2]+ Stopped   (tty input)    telnet [3] Stopped    (signal)       lynx [ejr@hobbes ejr]$ 

To Check Job Status with jobs:

  • jobs

    At the shell prompt, type jobs. You'll see a list of the current jobs(that is, processes that you've suspended or otherwise controlled) either running or stopped, as shown in Code Listing 9.6. Using the job numbers on the left, you can choose to run the jobs in the background or foreground, to resume them, or to kill the jobs, as described in the next few sections in this chapter.


  • Depending on your shell, you can often kill jobs with kill followed by a % and the job number or command namefor example, you could kill the ftp job in Code Listing 9.6 with kill %ftp or kill %1. See Deleting Processes with kill later in this chapter for more on killing jobs.

Unix(c) Visual Quickstart Guide
UNIX, Third Edition
ISBN: 0321442458
EAN: 2147483647
Year: 2006
Pages: 251

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: