Last active
May 22, 2024 20:20
-
-
Save selimhex/84b43d55696ad1833ae4b8e51d970cf9 to your computer and use it in GitHub Desktop.
search (filter) and destroy (kill) running process oneliners
This file contains 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
# list all the processes and filter by "ssh" and kill the selected process | |
ps -eo pid,command | grep ssh | fzf | awk '{print $1}' | xargs kill | |
# search for the process and kill the selected process | |
# use ' before keyword to search for the exact keyword (e.g. 'ssh) | |
ps -eo pid,command | fzf | awk '{print $1}' | xargs kill |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment