Kill all proceess with the name XXX


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Kill all proceess with the name XXX
# 1  
Old 01-29-2013
Kill all proceess with the name XXX

Hello guys,

I have a problem. How can i "kill -9" with the name process? I have a lot of process with the same name, but i do not want kill each one with the process ID. There is a comand to "kill -9" al process with name "XXXX".

Thanks!
# 2  
Old 01-29-2013
Have a look at the pkill manpage.
# 3  
Old 01-29-2013
Have a look if the command killall is available on your system.
Btw. kill -9 is a very bad idea and stopping lots of processes ungracefully without an opportunity for them to clean up before they die may cause trouble.
# 4  
Old 01-29-2013
.. unless you are on HP-UX where killall means something quite different:

Code:
 DESCRIPTION
      killall is a procedure used by /usr/sbin/shutdown to kill all active
      processes not directly related to the shutdown procedure.

# 5  
Old 01-29-2013
Quote:
Originally Posted by Xedrox
Hello guys,

I have a problem. How can i "kill -9" with the name process? I have a lot of process with the same name, but i do not want kill each one with the process ID. There is a comand to "kill -9" al process with name "XXXX".

Thanks!
If you don't find any external command (pkill/killall), its so simple to have a loop or with the commands like xargs or similar.
# 6  
Old 01-30-2013
Quote:
Originally Posted by Xedrox
Hello guys,

I have a problem. How can i "kill -9" with the name process? I have a lot of process with the same name, but i do not want kill each one with the process ID. There is a comand to "kill -9" al process with name "XXXX".

Thanks!
Try:

Code:
kill -9 $( pidof XXXX )

Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Red Hat

Gnome3 locksup on new Linux kernel 12.6.xxx & 12.5.xxx

Hi Forum Ive been having a problem with the kernal(s) for some strange reason it every time I try and access the date and time/calendar or system settings it locks up the whole laptop and nothing responds. :(. This doesn't happen 11.10.xxx kernel . Any help would be much appreciated and thank you... (1 Reply)
Discussion started by: ShinTec
1 Replies

2. Shell Programming and Scripting

Extracting entries starting with xxx

Hello, I am trying to extract all words (entries) from a file beginning with 123. For example: ververv ewfaafa 123asd 4334j fdgfgf fdfdssd 123890 xxxxx eeee sss 1234 sdfsf were sfs fbdsdfb fsdg sdgfsd bfg sdfb dsfb sdfg sdf ergerg 123pop sdfgdfg 123ww 123qq dffg Desired output: 123asd... (4 Replies)
Discussion started by: palex
4 Replies

3. Shell Programming and Scripting

Kill an specific process ID using the KILL and GREP commands

Good afternoon I need to KILL a process in a single command sentence, for example: kill -9 `ps -aef | grep 'CAL255.4ge' | grep -v grep | awk '{print $2}'` That sentence Kills the process ID corresponding to the program CAL255.4ge. However it is possible that the same program... (6 Replies)
Discussion started by: enriquegm82
6 Replies

4. AIX

echo $varibla | mail -s "subject" "xxx@xxx.com" not ruuning as expected

Hi Folks, As per the subject, the following command is not working as expected. echo $variable | mail -s "subject" "xxx@xxx.com" Could anyone figure it out whats wrong with this. I am using AIX box. Regards, (2 Replies)
Discussion started by: gjarms
2 Replies

5. UNIX for Dummies Questions & Answers

grep XXX that not followed by YYY

I want to grep all lines containing blocking sess= that are not followed by 0x0 cat trace.log blocking sess=0x0 blocking sess=0x0 rrrr...... blocking sess=121 blocking sess=0x0 blocking sess=0x0 blocking sess=0x0 some other lines blocking sess=001 blocking sess=0x0 blocking sess=0x1... (6 Replies)
Discussion started by: ynixon
6 Replies

6. UNIX for Dummies Questions & Answers

xxx.tar.gz error

Hi All, We have taken data backup using gzip but when we try to restore from ex:xxx.tar.gz file got below error. invalid compressed data--crc error and invalid compressed data--length error How to recover my original data. Thanks in advance for your suggestion (1 Reply)
Discussion started by: bache_gowda
1 Replies

7. Shell Programming and Scripting

Delete a file from XXX.tar.Z

Hi All can u please let me know how to delete a file from XXX.tar.Z file with out uncompressing this file. thanks in advance. --Bali (0 Replies)
Discussion started by: balireddy_77
0 Replies

8. UNIX for Advanced & Expert Users

When kill doesnt work, how to kill a process ?

Hi All, I am unable to kill a process using kill command. I am using HP-UX system. I have tried with kill -9 and i have root privilages. How can i terminate this daemon ? ? ? Regards, Vijay Hegde (3 Replies)
Discussion started by: VijayHegde
3 Replies
Login or Register to Ask a Question