Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tlug: telnet: how to get a process to stay alive after disconnecting?



On Fri, 26 May 2000, Thomas O'Dowd wrote:

> > You can use the command "nohup" see man nohup or info nohup for more info.
> > 
> > prompt$ nohup somecommand
> > 
> > should do the trick. stderr and stdout will go to a file nohup.out. If you
> > want to just collect errors then you'll have to redirect stderr separately
> > to a file. Something like...
> >
> > > I want to get a process started via telnet and have it finish on its own
> > > after I have disconnected and just collect the error messages. How do I do that? 

You may also want to check out the "screen" command. The problem with
using nohup is that since the output is redirected to a file, you can't
see it interactively. screen lets you run the process normally, but it
will continue running the process even after you have logged out. Here's
what to do:

$ screen
(You should get another shell prompt now.)
$ <run your program>

Then press "Ctrl-A d" to detach your screen process and then you can log
out. To resume the screen process, type "screen -r" in the shell (you can
even do "screen -r -d" to force-resume it if it thinks you're still
attached because you didn't log out normally). You can also backscroll in
screen:

Ctrl-A ESC enters backscroll mode
Ctrl-B scrolls backwards in backscroll mode
Ctrl-F scrolls forwards in backscroll mode
ESC exits backscroll mode

Hope this helps,

-Philip Mak (pmak@example.com)

--------------------------------------------------------------------
Next Nomikai Meeting: June 16 (Fri), 19:00   Tengu TokyoEkiMae
Next Technical Meeting: July 8 (Sat) 13:30   Topic: TBA
--------------------------------------------------------------------
more info: http://www.tlug.gr.jp        Sponsor: Global Online Japan


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links