Unix is a multitasking operating system (like most everyday operating systems nowadays) and as such it has and idea on how to do handle jobs. Jobs are executing which happen on a per shell basis as opposed to processes. Here is a summary of everything that you need to know about UNIX jobs.
command &
When running a command with an ampersand at the end for example "ls &" that job is put into the background and runs which you execute other commands on the shell.
CTRL-c
If you want to kill a long running job press this combination to stop the job from running.
CTRL-z
Suspends a job, but does not kill it.
bg %num
If you suspend a job and want to run it in the background (or you forgot to put a job in the background and put it in the background) run this.
fg %num
Run this to bring to front a background job or to run a suspended job in the foreground.
kill %num
Kills a job number.
jobs
List all the active jobs on the shell. There can be multiple jobs with many running in the background.
set notify
Notifies immediately on the shell if there is change in the a background job.
Comments 1 Comment