加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

linux – 在屏幕会话中包装当前会话

发布时间:2020-12-13 18:21:44 所属栏目:Linux 来源:网络整理
导读:我开始了一个大的操作,但我没有启动屏幕会话,所以我不能在不取消操作的情况下断开连接. 有没有办法注入屏幕,以便操作继续并将其输出发送到屏幕会话,我可以安全地断开我的ssh会话? 解决方法 浏览完你的“号码”后链接我实际上在伯爵的serverfault上找到了 th
我开始了一个大的操作,但我没有启动屏幕会话,所以我不能在不取消操作的情况下断开连接.

有没有办法注入屏幕,以便操作继续并将其输出发送到屏幕会话,我可以安全地断开我的ssh会话?

解决方法

浏览完你的“号码”后链接我实际上在伯爵的serverfault上找到了 this answer:

However,for your actual problem,there’s another thing you could try: after having
launched your job from the terminal,background it by typing ctrl-z and then bg.
After that,detach the job from it’s parent shell – in bash: disown -h %. After
that,you can safely close the terminal and the job will continue running.

而这一点来自Rob Wells的同一个问题:

$screen -S my_process $07001 $(pgrep my_process) /redraw

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读