Kill all detached screen sessions

前端 未结 6 1712
时光取名叫无心
时光取名叫无心 2021-01-29 20:47

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

There are screens on:

    84918.tty         


        
6条回答
  •  一生所求
    2021-01-29 21:07

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

    Kill only Detached screen sessions (credit @schatten):

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

提交回复
热议问题