Skip to content

Instantly share code, notes, and snippets.

@Lh4cKg
Last active December 7, 2018 12:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Lh4cKg/51aa0b6727e640a9258736a460060898 to your computer and use it in GitHub Desktop.
Save Lh4cKg/51aa0b6727e640a9258736a460060898 to your computer and use it in GitHub Desktop.
kill all python process
[innotec@innotec ~]$ ps aux | grep 'manage.py' | awk '{print $2}' | xargs kill -9
# add alias in .bashrc
# kill python processes
alias ppsk="pkill -f manage.py"
# or
[innotec@innotec ~]$ killall python
# or
alias pk="ps aux | grep 'manage.py' | awk '{print $2}' | xargs kill -9"
#function kl() {
#PID="ps -eaf | grep 'manage.py' | awk '{print $2}'"
#if [[ "" != "$PID" ]]; then
# echo "killing $PID"
# kill -9 $PID
#fi
#}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment