LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can I assign a Command to a specific PID so I can kill a predetermined PID (https://www.linuxquestions.org/questions/linux-newbie-8/can-i-assign-a-command-to-a-specific-pid-so-i-can-kill-a-predetermined-pid-911653/)

johnmccarthy 11-03-2011 08:36 AM

Can I assign a Command to a specific PID so I can kill a predetermined PID
 
I have a specific process or command that I would like to kill but it appears PIDs are assigned randomly (or in an order I don't understand)to processes. At times I would like to kill a specific Command or process based on what the command line topreports it as. Example if I want to kill gedit I have to type the specific assiged PID (typing kill gedit does not work).

Is there a command line string I can enter that says assign or reserve this command to PID Number XXX? As another option can I type a command that says kill this specific process which is always predetermined to be assigned to a process number? Is there a different approach I'm not considering?

A million thanks,
Johnny Mac

allend 11-03-2011 08:41 AM

Have a look at 'man pkill'.


All times are GMT -5. The time now is 08:29 PM.