If I send a task to the background with
If I type
I'm just a little confused as to how background processes work.
If I have a
What do the pluses and minuses mean?
asked 27 Jul '10, 23:51
bg and fg are built into the shell. Hence their man page (assuming you are using bash) is part of bash(1). Look for the section labelled "Job Control". An online version can be found at: http://linux.die.net/man/1/bash
If you stop a job using Ctl-Z, all you have to do is type "fg" or "bg" to restart it in the foreground or background, provided it is the "current job" (labelled with a "+".)
If you want to see all of your running and stopped jobs in a shell, type "jobs". It lists them with a job number and priority. The most current job is listed with a "+", all other background jobs are listed with "-".
Then you can type %1 (for instance) to restart job number 1 in the foreground. (It's a shortcut for "fg %1".)
Reading the bash(1) man page takes effort, but there's tremendous power available in the shell if you just know how to use it. That makes reading the man page well worth the effort.
answered 28 Jul '10, 00:17