gpt4 book ai didi

gnu-screen - GNU Screen 如果存在则连接,如果不存在则创建

转载 作者:行者123 更新时间:2023-12-03 13:58:34 25 4
gpt4 key购买 nike

目前,我在 iPad 上使用 GNU 屏幕,并在连接丢失时使用屏幕作为安全措施。目前,我只是运行 screen -S ipad 作为第一个命令,但是有没有办法让它自动连接到旧的 ipad session ,如果它存在(如果不存在,则创建它)?我的一个警告是,我想在一个命令中自动执行此操作。

最佳答案

-D -R选项将使屏幕在必要时尝试分离或创建。

screen -D -R -S ipad

我建议您查看所有 -d|D -r|-R|-RR屏幕手册中的选项,因为有许多类似的结果。
-d -r
Reattach a session and if necessary detach it first.
-d -R
Reattach a session and if necessary detach or even create it first.
-d -RR
Reattach a session and if necessary detach or create it. Use the first session if more than
one session is available.
-D -r
Reattach a session. If necessary detach and logout remotely first.
-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. This is
the author's favorite.
-D -RR
Attach here and now. Whatever that means, just do it.
Note: It is always a good idea to check the status of your sessions by means of "screen -list".

关于gnu-screen - GNU Screen 如果存在则连接,如果不存在则创建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10433922/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com