A job is a process running in the background.
E.g.
./myscript.sh &
[1] myscript.sh 96243
A job relates to a command run from a terminal. It is attached to a terminal session. A command can be run in the background if it doesn't require any user input, and you want to continue running other commands in the foreground.
For instance, on an AIX/Informix system, I usually do something like
# nohup dbexport my_database &
The nohup redirects any output to a file (nohup.out) and the ampersand (&) puts the process in background mode. This allows me to continue working while my export completes.
The "job" is any process that is running in a background mode.
Crtl-Z also stops a process and puts it in the background - which is why "jobs" displays your vi session. You can recall your job with "fg", or you can tell a stopped process to continue in the background with "bg".
Last edited by omrsafetyo; Nov 28th, 2008 at 7:53 pm.
Reputation Points: 13
Solved Threads: 9
Junior Poster in Training
Offline 58 posts
since Apr 2008