bash – 杀死一个屏幕(但不是所有屏幕)

我有一个ubuntu服务器上运行的多个屏幕,它们被启动为:
screen -dmS screen1 cmd
screen -dmS screen2 cmd
etc...

我需要杀死一个屏幕,但不是全部.使用其名称杀死单个特定屏幕的正确命令是什么?我已经阅读了man pages,但我似乎无法找到我正在寻找的命令.

此外,我想将此命令写入bash脚本,因此我不能简单地屏幕-r screen1然后像往常一样按Ctrl X.

从手册页:
-X   Send the specified command to a running screen  session.  You  can
        use  the  -d or -r option to tell screen to look only for attached
        or detached screen sessions. Note that this command  doesn't  work
        if the session is password protected.

你可以做 :

screen -X -S <sessionid> kill

相关文章

用的openwrt路由器,家里宽带申请了动态公网ip,为了方便把2...
#!/bin/bashcommand1&command2&wait从Shell脚本并行...
1.先查出MAMP下面集成的PHP版本cd/Applications/MAMP/bin/ph...
1、先输入locale-a,查看一下现在已安装的语言2、若不存在如...
BashPerlTclsyntaxdiff1.进制数表示Languagebinaryoctalhexa...
正常安装了k8s后,使用kubect工具后接的命令不能直接tab补全...