LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 04-17-2006, 11:01 PM   #1
ekdya
Member
 
Registered: Oct 2003
Posts: 280

Rep: Reputation: 30
kill pid


Hi

isn't correct inorder to kill the process of say emacs
you type
#kill $(pidof emacs)

but this is not working. is there anyother way
using debian testing 2.6.15

thanks
 
Old 04-17-2006, 11:23 PM   #2
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62
You don't need the $

$ kill (pidof emacs)

If that doesn't work ... $ kill -9 (pidof emacs)
 
Old 04-18-2006, 02:50 PM   #3
ekdya
Member
 
Registered: Oct 2003
Posts: 280

Original Poster
Rep: Reputation: 30
on the #top output, I have a pid I need to kill
the steps below are not killing it

************************************************
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
22279 ekdya 25 0 21472 16m 2088 R 91.0 1.7 18:44.54 lisp.run

************************************************
<k>
************************************************
PID to kill: 22279 <RET>
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
22279 ekdya 25 0 21208 16m 2088 R 85.0 1.7 19:14.51 lisp.run
************************************************
Kill PID 22279 with signal [15]: <RET>
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
22279 ekdya 25 0 21208 16m 2088 R 85.0 1.7 19:14.51 lisp.run
************************************************
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
22279 ekdya 25 0 20332 15m 2088 R 92.9 1.6 20:51.49 lisp.run
************************************************
 
Old 04-18-2006, 05:04 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
You don't need the $
$ kill (pidof emacs)

In Bash, if you want to supply the outcome of the subshell commands () to kill, you do need the dollar sign.
Kill+pidof could be combined as "pkill -9 -f lisp.run".
 
  


Reply



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
kill <pid> does not do anything moskito01 Linux - General 9 08-25-2009 12:20 PM
kill pid.... won't work with 'pid' variable given.. sachitha Programming 6 03-06-2006 07:48 PM
when kill -9 PID wont work bleunuit Linux - Software 2 08-06-2004 11:46 AM
small bash script to kill a PID flosch Linux - General 3 05-06-2004 09:28 PM
question about kill(pid, sig) THETEZ Programming 3 04-18-2004 05:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 09:29 AM.

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
Open Source Consulting | Domain Registration