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

GNU 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.

等了一段时间后我才能够恢复。我怎样才能更可靠地做到这一点?

答案1

从屏幕手册页:

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.

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

相关内容