Created
March 5, 2018 12:47
-
-
Save mojocn/1f54504f878c149ad2c3057c6b90efc0 to your computer and use it in GitHub Desktop.
how to add process by name in bash
This file contains hidden or 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
#!/bin/bash | |
ps -efww|grep -w './start.sh'|grep -v grep|cut -c 9-15|xargs kill -9 | |
ps -efww|grep -w 'manage.py Mqtt_msg_process'|grep -v grep|cut -c 9-15|xargs kill -9 | |
ps -efww|grep -w 'manage.py Rds_msg_process'|grep -v grep|cut -c 9-15|xargs kill -9 | |
ps -efww|grep -w 'manage.py Event_notice_process'|grep -v grep|cut -c 9-15|xargs kill -9 | |
ps -efww|grep -w 'manage.py Offline'|grep -v grep|cut -c 9-15|xargs kill -9 | |
ps -efww|grep -w 'manage.py dahua'|grep -v grep|cut -c 9-15|xargs kill -9 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment