![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ypbind - multiple instances starting | blowtorch | SUN Solaris | 0 | 10-01-2007 03:51 AM |
| detecting multiple instances | ragha81 | Shell Programming and Scripting | 3 | 04-06-2007 07:09 AM |
| Creating instances of a program | tushar_johri | Shell Programming and Scripting | 2 | 05-25-2005 07:36 AM |
| Multiple file instances | gozer13 | UNIX for Dummies Questions & Answers | 1 | 12-29-2004 03:08 PM |
| multiple instances of syslogd - is it possible? | Gary Dunn | UNIX for Advanced & Expert Users | 9 | 07-20-2004 06:10 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
kill multiple instances of the same program
Hi,
I know that the answer to this is very simple, since I saw somebody do it some time back..but I forgot how. The problem is, I have multiple instances of the same program running simultaneously and I want to kill them all in a single command. I know that it can be done using awk '{print $2}' in combination with ps and kill but I am not able to formulate the exact command. The process in question (to be killed) is xterm. will deeply appreciated all help. ipzig |
| Forum Sponsor | ||
|
|
|
|||
|
Will pkill kill only the instance that a user has permission to kill ?
user A can run the instance proc p1 and user B can also run the same instance proc p1 will pkill identify only the instances from user A and kill only those instances of proc p1 ( may be something like ps -fu $user ) |
|
|||
|
Well, that is true.
Am interested to know whether it would skip it as such or will throw an error stating unable to kill the other instance. I will check that ! |
|
|||
|
I don't have pkill.
Yet, I know the answers a doddle if you can combine kill, ps -fu, and awk '{print $2}' (with ps). Only, am not able to do it myself, and waiting for a shell expert to do it for me.. Regards ipzig |