-
-
Save forAllBright/bb819dced3ee31a2e00bb6f995cdb32a to your computer and use it in GitHub Desktop.
kill all python process
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
[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