LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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-18-2006, 12:01 AM   #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-18-2006, 12:23 AM   #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: 60
You don't need the $

$ kill (pidof emacs)

If that doesn't work ... $ kill -9 (pidof emacs)
 
Old 04-18-2006, 03: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, 06:04 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,541
Blog Entries: 54

Rep: Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924
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


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


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration