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?
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!