Use "screen" run background task w/o ssh connected
You may sometimes want to run an interactive task in background,
e.g. expect scripts, tintin++, iotop batch job, telnet bbs, wget, etc...
yet, without any ssh or win32-putty connected.
#1: Install Screen First on your Linux box
代碼:
$ sudo apt-get install screen
or
$ sudo yum install screen
#2: Run your process in "Screen background task"
代碼:
$ screen
$ run your process task
$ (press ctrl+A, then, press ctrl+D)
[detached from 2703.pts-3.TestLinuxBox]
In which the "2703" is the "screen task id"
#3: Bring the background task to foreground screen
代碼:
$ screen -r
There are several suitable screens on:
2703.pts-3.TestLinuxBox (07/14/13 10:07:29) (Detached)
2652.pts-2.TestLinuxBox (07/14/13 10:04:34) (Detached)
Type "screen [-d] -r [pid.]tty.host" to resume one of them.
$ screen -r 2703.pts-3.TestLinuxBox
________________
美術插畫設計案子報價系統 v0.1 Beta
爪哇禾雀
|