Find a process by name and kill it
- by Fabiano PS
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