#1  
Old 1st June 2006, 05:18
purga purga is offline
Junior Member
 
Join Date: Jun 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default kill a process by the pid

I have a daemon named: shero

I can use the following command to get the pid:
pgrep -u root shero

So, is there a one-line command to kill it? something like:
kill (pgrep -u root shero)

What's the exact expression?

Thanks in advance.
Reply With Quote
  #2  
Old 1st June 2006, 18:38
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,853
Thanks: 781
Thanked 1,558 Times in 1,477 Posts
Default

Try this:
Code:
kill -9 `pgrep -u root shero`
__________________
Falko
--
Follow me on:
Reply With Quote
  #3  
Old 11th June 2006, 09:50
EvanCarroll EvanCarroll is offline
Junior Member
 
Join Date: Jun 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by purga
I have a daemon named: shero

I can use the following command to get the pid:
pgrep -u root shero

So, is there a one-line command to kill it? something like:
kill (pgrep -u root shero)

What's the exact expression?

Thanks in advance.
man pkill.
pkill -u root shero
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kill Spam Assassin Sinisfun Installation/Configuration 1 5th May 2006 09:57
req: Bash / Script to auto kill PID if it's needed.... edge Programming/Scripts 8 14th March 2006 00:31
Auto kill a 'hangin' process after xx minutes.. edge Server Operation 0 10th March 2006 20:16
How do we handle cyrus defunct process? kimba Installation/Configuration 1 22nd February 2006 09:55
Screenshots of setup process inspector71 Installation/Configuration 2 19th February 2006 13:10


All times are GMT +2. The time now is 14:45.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Sponsored Links: Unified Communications: Thoughts, Strategies and Predictions
Join the discussion.
www.seamlessenterprise.com

IP Convergence
Integrate your wireless and wireline networks.
Learn how from the experts at Sprint.
www.seamlessenterprise.com

Wireless & Wireline Integration
Thoughts, strategies and solutions: join the discussion
www.seamlessenterprise.com

Unified Communications 2009
Join the Discussion. Now.
www.seamlessenterprise.com

Red Hat Virtual Experience - a free virtual event. Dec. 9th