So, I want to send a kill to a process, I know it's name
ps -ef | grep '_rails master'
root 2388 1 0 19:46 ? 00:00:04 unicorn_rails master -c /web/hero/config/unicorn.rb -E production -D
root 2582 2172 0 20:28 pts/0 00:00:00 grep --color=auto _rails master
It is unicorn_rails master [..] how do I kill it?
I tried so far: sed and expr. But cant pass it as param to kill
There exists a more direct command called pkill. Usage is as follows:
You can the command:
You can use also:
If you want to use grep, you can try:
You can use the following:
Note, the [] in 'grep [u]nicorn_rails' keeps you from matching on the grep command in the ps tree.