Reputation: 691
I don't want them any more.
I tried screen --help
and didn't find some command suite for this task.
Is there some way to solve this problem?
Upvotes: 3
Views: 4279
Reputation: 63576
Include this function in your .bash_profile:
killd () {
echo yo
for session in $(screen -ls | grep -o '[0-9]\{5\}')
do
screen -S "${session}" -X quit;
done
}
to run it, call killd
Upvotes: 0
Reputation: 5483
You'd need to loop over each detached screen session and issue the "quit" command. The following one-liner would do it for you:
screen -ls | grep "Detached" | awk '{print $1}' | xargs -i screen -X -S {} quit
Upvotes: 8