GNU 屏幕:如何可靠地恢复我的屏幕会话?

gro*_*kus 4 gnu-screen

今天早上我无法恢复我的 screen 会话,即使我杀死了旧的 screen -r 会话。

svtbuild@dvm-2:~/rfs$ screen -r 17757.pts-0.dvm-2
There is a screen on:
    17757.pts-0.dvm-2   (11/27/2012 04:49:19 PM)    (Attached)
There is no screen to be resumed matching 17757.pts-0.dvm-2.
Run Code Online (Sandbox Code Playgroud)

等了一会儿,我就可以继续了。我怎样才能更可靠地做到这一点?

ott*_*t-- 9

从屏幕联机帮助页:

screen -D -R
Attach here and now. In detail this means: If a session is running, then reattach.
If necessary detach and logout remotely first. If it was not running create it
and notify the user.
Run Code Online (Sandbox Code Playgroud)

正如选项中提到的-D -RR,除非您知道会话的状态,否则您应该使用 进行检查screen -list