LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-03-2011, 09:36 AM   #1
johnmccarthy
Member
 
Registered: Jul 2010
Posts: 64

Rep: Reputation: 1
Smile 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
 
Old 11-03-2011, 09:41 AM   #2
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 4,429

Rep: Reputation: 1348Reputation: 1348Reputation: 1348Reputation: 1348Reputation: 1348Reputation: 1348Reputation: 1348Reputation: 1348Reputation: 1348Reputation: 1348
Have a look at 'man pkill'.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Print all PID folders from /proc line-by-line with this format (( PID: command-line )) courteous Linux - Newbie 7 12-12-2010 05:47 PM
What is the more easier way to check the pid and kill the pid cmx08 Linux - General 5 09-09-2008 11:57 PM
kill pid.... won't work with 'pid' variable given.. sachitha Programming 6 03-06-2006 08:48 PM
PID Kill Script or command ? Webmin rapture_1 Linux - General 1 11-02-2005 12:11 PM
/var/run/[XXX].pid - Tcl pid code liguorir Linux - Software 1 05-20-2004 11:32 PM


All times are GMT -5. The time now is 10:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration