[GLLUG] bash CTRL-Z Question

Matt Graham danceswithcrows at usa.net
Tue Nov 16 12:24:43 EST 2004


On Tuesday 16 November 2004 12:08, after a long battle with technology, 
Brian Hoort wrote:
> CTRL-Z in bash puts a process on pause and gives you your prompt back
> so you can do something quick.  How can I do the same thing but still
> have the process run while in the background?  Couldn't find with
> quick search.  Is it possible?

machine:~$ command &

...in bash, the & puts the command in the background, so you can 
continue doing things.  You can switch it back to the foreground with 
"fg %1".  You can have multiple jobs running in the background; first 
one started is %1, second one is %2, etcetera.

If you've put a process into the STOP state with Ctrl-Z or "kill -STOP", 
you can always resume it by doing "kill -CONT".  Note that this may not 
work properly if the process you stopped is a user-interactive process; 
I never could get slrn to work right after STOPping it.  (ncurses 
problem? Oh well...)

-- 
   "EXTERMINATE!  EXTERMINATE!"
   "Now do you understand why you shouldn't tease the Daleks, Beaver?"
   "Gee, I'm sorry, Mom."  --Triangle & Robert
There is no Darkness in Eternity/But only Light too dim for us to see


More information about the linux-user mailing list