Skip to content

Instantly share code, notes, and snippets.

@syneart
Last active November 7, 2020 09:53
Show Gist options
  • Save syneart/9e1ab1a98898878606e8 to your computer and use it in GitHub Desktop.
Save syneart/9e1ab1a98898878606e8 to your computer and use it in GitHub Desktop.
with grep result, kill process
# if you want to kill all process with name "inetsim"
ps -aux | grep inetsim | grep -v grep | awk '{print $2}' | sudo xargs kill -9
@syneart
Copy link
Author

syneart commented Sep 18, 2018

if we want to put the command to the ~/.bashrc with alias
we can put such as,
alias xargs_kill="ps -aux | grep index.php | grep -v grep | awk '{print \$2}' | xargs kill -9"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment