logging out leaving a command running

Peter Garrett peter.garrett at optusnet.com.au
Mon Jan 23 09:02:22 UTC 2006


On Mon, 23 Jan 2006 14:28:38 +0800
"Michael T. Richter" <ttmrichter at gmail.com> wrote:

> On Sun, 2006-22-01 at 22:57 -0700, jim barnes wrote:
> > From man bash:
> > If a command is terminated by the control operator &, the shell executes the 
> > command in the background in a subshell. The shell does not wait for the 
> > command to finish, and the return status is 0
> 
> > script &
> > exit
> 
> > That's all!
> 
> Have you tried anything like that ever?  Try something that will take a
> long time to run -- a "find / &", say, and then exit.  Keep an eye on
> running processes.  (You can do it all in one terminal window by using
> tabs.)

cd music && mpg321 brahms/* &

< hit enter again to get a prompt, as mpg321 likes to tell you what is
playing>

jobs

[1]+  Running                 mpg321 * &

disown %1

exit

My music is still playing as we speak :)  My terminal is gone...

(But I agree that "screen" is a much better solution to the OP's problem)

Peter




More information about the ubuntu-users mailing list