当前位置: 技术问答>linux和unix
Error occurs when execute kill command in Redhat V10
来源: 互联网 发布时间:2015-09-15
本文导语: [root@localhost root]# kill -9 `ps -ef | awk '$1 == "chavez" {print $2}'` kill: usage: kill [-s sigspec | -n signum | -sigspec] [pid | job]... or kill -l [sigspec] [root@localhost root]# Error occurs when execute this kill command in Redhat Linu...
[root@localhost root]# kill -9 `ps -ef | awk '$1 == "chavez" {print $2}'`
kill: usage: kill [-s sigspec | -n signum | -sigspec] [pid | job]... or kill -l [sigspec]
[root@localhost root]#
Error occurs when execute this kill command in Redhat Linux V10.
I hava maned kill for its syntax, and find the pid argument can take a commandname as its value.
1. Is the argument job mentioned in system error hint above same as commandname. And
2. Is this command substitute string
`ps -ef | awk '$1 == "chavez" {print $2}'`
taken as the value of the argument mentioned in item 1 above.
kill: usage: kill [-s sigspec | -n signum | -sigspec] [pid | job]... or kill -l [sigspec]
[root@localhost root]#
Error occurs when execute this kill command in Redhat Linux V10.
I hava maned kill for its syntax, and find the pid argument can take a commandname as its value.
1. Is the argument job mentioned in system error hint above same as commandname. And
2. Is this command substitute string
`ps -ef | awk '$1 == "chavez" {print $2}'`
taken as the value of the argument mentioned in item 1 above.
|
可以啊,RH9.RH10???
[root@localhost a]# kill -9 `ps -ef | grep 'mozilla' | grep -v 'grep' | awk '{print $2}'`
[root@localhost a]#
[root@localhost a]# kill -9 `ps -ef | grep 'mozilla' | grep -v 'grep' | awk '{print $2}'`
[root@localhost a]#