Using “kill” unix command with pipeBy neokrates, written on May 4, 2010 |
bash snippet |
- neokrates
- Email: uwarov@yahoo.com
- Website: http://www.thinkplexx.com
- Join date: 05-31-09
- Posts: 20
Rate it
Ad
Poll
Loading ...
Most popular search terms:
Stats
-
Since publication, this page was visited 495 time(s).
Su can execute commands under other user without interaction.
Example:
Normal pipe doesn’t work with kill. Here is what does work.
I have started many java processes and now want to get rid of them:
kill -9 `ps -ef | grep "java" | awk '{print $2}'`
Remark: ps -ef | grep "my_token" is a common way to find some process, so if I started tomcat with ./wrapper start I would list it like:
ps -ef | grep "tomcat"
- or
ps -ef | grep "wrapper"
|
TAGS
|
|
SOCIAL
|


















