How do I kill or terminate an application without rebooting. TIA David
xxxx pgpgp unsigned xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
* DB Troll
How do I kill or terminate an application without rebooting.
man kill xxxx pgpgp unsigned xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx beware, i may have not written this message xxxxxxxxxxxxxx -- Patrick Shanahan Please avoid TOFU and trim >quotes< http://wahoo.no-ip.org Registered Linux User #207535 icq#173753138 @ http://counter.li.org
Patrick Shanahan wrote:
xxxx pgpgp unsigned xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
* DB Troll
[02-25-03 20:28]: How do I kill or terminate an application without rebooting.
man kill
xxxx pgpgp unsigned xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx beware, i may have not written this message xxxxxxxxxxxxxx
Thanks Patrick, I tried this with mozilla running by typing kill mozilla but it returns mozilla: no such pid, this is the one that I want to kill most of the time as it does not always close correctly. TIA David
On Tuesday 25 February 2003 07:49 pm, DB Troll wrote:
Patrick Shanahan wrote:
xxxx pgpgp unsigned xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
* DB Troll
[02-25-03 20:28]: How do I kill or terminate an application without rebooting.
man kill
xxxx pgpgp unsigned xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx beware, i may have not written this message xxxxxxxxxxxxxx
Thanks Patrick,
I tried this with mozilla running by typing kill mozilla but it returns mozilla: no such pid, this is the one that I want to kill most of the time as it does not always close correctly. TIA David find the PID of Mozilla by using 'ps -A |grep mozilla' then type 'kill -TERM PID' where PID is the process id of mozilla that you found with the ps command. That should work. if kill -TERM doesnt work try kill -KILL instead. -- #------------------------ #Eric Bambach #Eric@CISU.net #------------------------
On Tue, 2003-02-25 at 20:51, Eric wrote:
On Tuesday 25 February 2003 07:49 pm, DB Troll wrote:
Patrick Shanahan wrote:
xxxx pgpgp unsigned xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
* DB Troll
[02-25-03 20:28]: How do I kill or terminate an application without rebooting.
man kill
xxxx pgpgp unsigned xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx beware, i may have not written this message xxxxxxxxxxxxxx
Thanks Patrick,
I tried this with mozilla running by typing kill mozilla but it returns mozilla: no such pid, this is the one that I want to kill most of the time as it does not always close correctly. TIA David find the PID of Mozilla by using 'ps -A |grep mozilla' then type 'kill -TERM PID' where PID is the process id of mozilla that you found with the ps command. That should work. if kill -TERM doesnt work try kill -KILL instead.
You can try killall<name of app>. For your example it would be "killall mozilla" all on one line without the quotes. -- Marshall "Nothing is impossible, We just do not have all the anwsers to make the impossible, possible."
xxxx pgpgp unsigned xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
* DB Troll
Patrick Shanahan wrote:
* DB Troll
[02-25-03 20:28]: How do I kill or terminate an application without rebooting.
man kill
I tried this with mozilla running by typing kill mozilla but it returns mozilla: no such pid, this is the one that I want to kill most of the time as it does not always close correctly.
You are trying to kill the wrong app. You want to kill mozilla-bin. kill <back-tic>pidof mozilla-bin<back-tic> xxxx pgpgp unsigned xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx beware, i may have not written this message xxxxxxxxxxxxxx -- Patrick Shanahan Please avoid TOFU and trim >quotes< http://wahoo.no-ip.org Registered Linux User #207535 icq#173753138 @ http://counter.li.org
The 03.02.25 at 19:49, DB Troll wrote:
How do I kill or terminate an application without rebooting.
man kill
Thanks Patrick,
I tried this with mozilla running by typing kill mozilla but it returns mozilla: no such pid, this is the one that I want to kill most of the time as it does not always close correctly.
Again: "man kill" X-) kill takes a numeric argument, not a name. You might use killall instead, but be very-very careful, and do not use it on a unix machine. -- Cheers, Carlos Robinson
In a previous message, DB Troll wrote:
I tried this with mozilla running by typing kill mozilla but it returns mozilla: no such pid
Trying to find the pid is annoying - just use killall instead, because this takes the name of the task instead. 'killall mozilla' will kill all mozilla processes. Just don't use this on a unix system, on which killall kills all processes (AIUI)!! John -- John Pettigrew Headstrong Games john@headstrong-games.co.uk Fun : Strategy : Price http://www.headstrong-games.co.uk/ Board games that won't break the bank Valley of the Kings: ransack an ancient Egyptian tomb but beware of mummies!
* John Pettigrew (john@xl-cambridge.com) [030226 00:06]: ->In a previous message, DB Troll wrote: -> ->> I tried this with mozilla running by typing kill mozilla but it returns ->> mozilla: no such pid -> ->Trying to find the pid is annoying - just use killall instead, because this ->takes the name of the task instead. 'killall mozilla' will kill all mozilla ->processes. Just don't use this on a unix system, on which killall kills all ->processes (AIUI)!! I would first open a terminal and use top to see what the process is actually called..in this case it's mozilla-bin. If you do "killall mozilla-bin" it will get all open Mozilla processes. I'm not sure which Unix your telling him not to use killall but as far as Solaris goes..any version before 2.6 doesn't even have a command called killall and with 2.7 (or 7 for the marketing people out there) you had pkill which did pretty much what killall does. But for Solaris 2.8 and 2.9 they indeed have a command called killall and the usage is pretty much the same as on any Linux system. I've never run into a killall command on any BSD or AIX system I've used. I'm interested in what Unix OS has a killall command that kills every pid. :) -- Ben Rosenberg ---===---===---===--- mailto:ben@whack.org Tell me what you believe.. I'll tell you what you should see.
In a previous message, Ben Rosenberg wrote:
I'm not sure which Unix your telling him not to use killall
OK, fair enough - I was just passing a the warning I was given when someone told be about killall (on this list, IIRC). John -- John Pettigrew Headstrong Games john@headstrong-games.co.uk Fun : Strategy : Price http://www.headstrong-games.co.uk/ Board games that won't break the bank Fields of Valour: 2 Norse clans battle on one of 3 different boards
On Wednesday 26 February 2003 09:44, Ben Rosenberg wrote:
I'm not sure which Unix your telling him not to use killall but as far as Solaris goes..any version before 2.6 doesn't even have a command called killall
http://www.doc.ic.ac.uk/csg/manuals/all-manual-pages/solaris/usr/man/man1m/k...
On Wed, 26 Feb 2003, John Pettigrew wrote:
In a previous message, DB Troll wrote:
I tried this with mozilla running by typing kill mozilla but it returns mozilla: no such pid
Trying to find the pid is annoying - just use killall instead, because this takes the name of the task instead. 'killall mozilla' will kill all mozilla processes. Just don't use this on a unix system, on which killall kills all processes (AIUI)!!
Finding the pid is easy e.g. make a little executable file called fi with the contents - ps a -f -e|grep $1 then type.. . fi moz ..or whatever piece of a name you're looking for. -- (o< //\ Powered by SuSE Linux V_/_ Virusproof. Crashproof. 9:58am up 2 days, 13:04, 23 users, load average: 2.38, 1.49, 1.24 processes 1312327
In a previous message, Robt. Miller wrote:
Finding the pid is easy e.g. make a little executable file called fi with the contents - ps a -f -e|grep $1 then type.. . fi moz ..or whatever piece of a name you're looking for.
But why bother (in this sort of case) when killall takes the task name? John -- John Pettigrew Headstrong Games john@headstrong-games.co.uk Fun : Strategy : Price http://www.headstrong-games.co.uk/ Board games that won't break the bank Fields of Valour: 2 Norse clans battle on one of 3 different boards
On Wed, 26 Feb 2003, John Pettigrew wrote:
In a previous message, Robt. Miller wrote:
Finding the pid is easy e.g. make a little executable file called fi with the contents - ps a -f -e|grep $1 then type.. . fi moz ..or whatever piece of a name you're looking for.
But why bother (in this sort of case) when killall takes the task name?
Because of the aforementioned problem with not correctly indicating the name, mozilla vs. mozilla-bin. Also you might have several running programs and want to kill only one of them. -- (o< //\ Powered by SuSE Linux V_/_ Virusproof. Crashproof. 10:24am up 2 days, 13:30, 23 users, load average: 2.08, 1.97, 1.73 processes 1329332
On Wed, 26 Feb 2003 10:25:55 -0500 (EST)
"Robt. Miller"
On Wed, 26 Feb 2003, John Pettigrew wrote:
In a previous message, Robt. Miller wrote:
Finding the pid is easy e.g. make a little executable file called fi with the contents - ps a -f -e|grep $1 then type.. . fi moz ..or whatever piece of a name you're looking for.
But why bother (in this sort of case) when killall takes the task name?
Because of the aforementioned problem with not correctly indicating the name, mozilla vs. mozilla-bin. Also you might have several running programs and want to kill only one of them.
You might want to try KillProc. It will search for any string and kill it. Like "killproc -a moz" will kill anything with moz in the name. It's dangerous, but handy. http://zentara.net/files/KillProc.c To compile: gcc -o killproc KillProc.c -- use Perl; #powerful programmable prestidigitation
In a previous message, DB Troll wrote:
I tried this with mozilla running by typing kill mozilla but it returns mozilla: no such pid
Or, of course, you could use xkill, which gives you a skull-and-crossbones cursor that will kill any task that you click on. John -- John Pettigrew Headstrong Games john@headstrong-games.co.uk Fun : Strategy : Price http://www.headstrong-games.co.uk/ Board games that won't break the bank Knossos: escape the ever-changing labyrinth before the Minotaur catches you!
On Wednesday 26 February 2003 08:05, John Pettigrew wrote:
In a previous message, DB Troll wrote:
I tried this with mozilla running by typing kill mozilla but it returns mozilla: no such pid
Or, of course, you could use xkill, which gives you a skull-and-crossbones cursor that will kill any task that you click on.
Ctrl-Alt-Esc usually does the same thing Pam -- Drive on the Left! If you're not with us you are against us! Linux StepbyStep: http://www.linux-sxs.org/stepbystep.html
On Tue, 25 Feb 2003 19:26:16 -0600 DB Trollwrote: > How do I kill or terminate an application without rebooting. This has been partially answered. 1. Find the pid for the app. 2. use SIGTERM first so the application can shut itself down gracefully: kill -TERM 23824 (assuming that 23824 is the correct pid). 3. If the application has not terminated, the use the SIGKIL signal: kill -9 23824 The SIGKILL signal cannot be caught by the application. There are some things that may prevent the application from completely dieing, such as pending I/O, child processes, et. al. BTW: I have a Bourne shell kill script that also kills by name: Kill -9 foo ------------ begin #!/bin/sh if [ $# -lt 2 ];then echo Usage: $0 -signal pattern;exit 1;fi kill $1 `ps gawux \ | grep "$2" \ | sed -e "/ $$ /d" -e "/ grep /d" -e 's/ */ /g' \ | cut -f2` exit 0 # # Kill - # This script runs 'ps gawux' and kills the processes that match the pattern. # Warning: It is very easy to kill more than you intended to kill. ------------end Note that the script does have a minor bug in it. Also note that the 's/ */ /g' is really 's/ */\t/g' But the \t (tab) will not expand in the pattern. Just about every Unix guy I know has some variant of this hanging around, and there are some perl variants. -- Jerry Feldman Boston Linux and Unix user group http://www.blu.org PGP key id:C5061EA9 PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
On Tuesday 25 February 2003 08:26 pm, DB Troll wrote:
How do I kill or terminate an application without rebooting. TIA David
--================= David, All the other recommendations are good and will help you in learning how to do things in the konsole. Or you could just press Ctrl-Alt-Esc, which turns your pointer into a skull & crossbones, put that in the window of the offending program and left click! There ya go, program gone! Or you could just press Ctrl-Esc and let it open your KDE System Guard program, find the misbehaving program, select it then click on the Kill button! So many things in Linux and so little time to learn them all. ;o) Patrick --- KMail v1.5 --- SuSE Linux Pro v8.1 --- Registered Linux User #225206 On any other day, that might seem strange...
participants (13)
-
Anders Johansson
-
Ben Rosenberg
-
Carlos E. R.
-
DB Troll
-
Eric
-
Jerry Feldman
-
John Pettigrew
-
Marshall Heartley
-
Pam R
-
Patrick Shanahan
-
PL O'Smith
-
Robt. Miller
-
zentara