首頁 繪圖設計 工作閒聊 比賽活動 美術討論 標籤 圖片
Use "screen" run background task w/o ssh connected
Type(Type) 2013/7/14 10:17

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

(2,239 views)
[更多討論] 討論區 Windows, Linux, Perl, PHP, C/C++, Driver, Web 理論、應用、硬體、軟體

"Use "screen" run background task w/o ssh connected" 傳統頁面(電腦版)

首頁 繪圖設計 工作閒聊 比賽活動 美術討論 標籤 圖片
傳統桌面版 [ 登入/註冊 ]
© Vovo2000.com Mobile Version 小哈手機版 2024