Current position: home page > Write casually >How to batch close multiple screens at one time under Linux (end all screen commands)

How to batch close multiple screens at one time under Linux (end all screen commands)

Author: blueleaf Classification: Write casually Time: January 6, 2024 Browse: 591

Under Linux, we can use screen to process some task events in the background. When screen is used too much, we can use the command screen - ls to see the list. If it is troublesome and time-consuming to manually end screen operations one by one, how can we close multiple screens in batches at one time? What is the end of all screen commands?

 How to close multiple screen.png in batches at one time under Linux

In Linux, if you want to batch close multiple screens at one time, the command to end all screens is as follows. Follow the steps to batch end all screens.

 //Enter the following command to check the number of screens screen -ls |awk '/Socket/'|awk '{print $1}' //Then change the number 10 below to the number obtained by the above command, execute the command, and close all screens screen -ls|awk 'NR>=2&&NR<=10{print $1}'|awk '{print "screen -S "$1" -X quit"}'|sh

Disclaimer:

Website: Click Copy to share with friends!

All content resources shared by this website, if not noted, are original by Blueleaf. If you need to reprint, please indicate the source; Please contact us in case of infringement Contact handling Please understand!

Comment List
 blink the eyes kiss Growl happy think poor It's embarrassing Grievance ha-ha hush Right hum Zuo Hum Hum doubt A bad laugh Make money Sadness Be cool Seduce fierce handshake yeah Hee hee Shyness applause greedy Madness Embrace gather and watch Mighty awesome
Submit comments

Clear information
Close Comment
music appreciation
Back to top