Last active
April 15, 2016 02:14
-
-
Save P7h/349e1db407b1b219b5e7 to your computer and use it in GitHub Desktop.
Kill all tmux sessions and screen sessions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Not advisable. Do this ONLY if you understand what you are doing! | |
| # This will terminate all your tmux or screen sessions, if you have any work yet to be saved, you will not be able to recover if you do this. | |
| # Kill all the tmux sessions | |
| tmux ls | grep : | cut -d. -f1 | awk '{print substr($1, 0, length($1)-1)}' | xargs kill | |
| # Kill all the detached screen sessions | |
| screen -ls | grep Detached | cut -d. -f1 | awk '{print $1}' | xargs kill |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment