杀死所有独立的屏幕会话 [英] Kill all detached screen sessions

查看:75
本文介绍了杀死所有独立的屏幕会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我执行screen -ls时,会看到以下内容.如何杀死所有独立的会话?

When I execute screen -ls, I see the following. How can I kill all the detached sessions?

有以下屏幕:

There are screens on:

    84918.ttys002.ros-mbp   (Detached)

    84944.ttys008.ros-mbp   (Detached)

    84970.ttys013.ros-mbp   (Attached)

    84998.ttys002.ros-mbp   (Detached)

    85024.ttys002.ros-mbp   (Detached) 

/var/folders/86/062qtcyx2rxbnmn8mtpkyghs0r0r_z/T/.screen中的5个套接字.

5 Sockets in /var/folders/86/062qtcyx2rxbnmn8mtpkyghs0r0r_z/T/.screen.

推荐答案

screen -ls | grep pts | cut -d. -f1 | awk '{print $1}' | xargs kill

杀死仅已分离屏幕会话(信用@schatten):

Kill only Detached screen sessions (credit @schatten):

screen -ls | grep Detached | cut -d. -f1 | awk '{print $1}' | xargs kill

这篇关于杀死所有独立的屏幕会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆