How to send control+c from a bash script?

前端 未结 5 1680
孤街浪徒
孤街浪徒 2020-12-02 11:05

I\'m starting a number of screens in a bash script, then running django\'s runserver command in each of them. I\'d like to be able to programmatically stop them

5条回答
  •  隐瞒了意图╮
    2020-12-02 11:40

    You can get the PID of a particular process like MySQL by using following commands: ps -e | pgrep mysql

    This command will give you the PID of MySQL rocess. e.g, 13954 Now, type following command on terminal. kill -9 13954 This will kill the process of MySQL.

提交回复
热议问题