Last active
December 7, 2018 12:29
-
-
Save Lh4cKg/51aa0b6727e640a9258736a460060898 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