Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

kill(1) [bsd man page]

KILL(1) 						      General Commands Manual							   KILL(1)

kill - terminate a process with extreme prejudice SYNOPSIS
kill [ -sig ] processid ... kill -l DESCRIPTION
Kill sends the TERM (terminate, 15) signal to the specified processes. If a signal name or number preceded by `-' is given as first argu- ment, that signal is sent instead of terminate (see sigvec(2)). The signal names are listed by `kill -l', and are as given in /usr/include/signal.h, stripped of the common SIG prefix. The terminate signal will kill processes that do not catch the signal; `kill -9 ...' is a sure kill, as the KILL (9) signal cannot be caught. By convention, if process number 0 is specified, all members in the process group (i.e. processes resulting from the current login) are signaled (but beware: this works only if you use sh(1); not if you use csh(1).) Negative process numbers also have special meanings; see kill(2) for details. The killed processes must belong to the current user unless he is the super-user. The process number of an asynchronous process started with `&' is reported by the shell. Process numbers can also be found by using ps(1). Kill is a built-in to csh(1); it allows job specifiers of the form ``%...'' as arguments so process id's are not as often used as kill arguments. See csh(1) for details. SEE ALSO
csh(1), ps(1), kill(2), sigvec(2) BUGS
A replacement for ``kill 0'' for csh(1) users should be provided. 4th Berkeley Distribution April 20, 1986 KILL(1)

Check Out this Related Man Page

KILL(1) 						    BSD General Commands Manual 						   KILL(1)

kill -- terminate or signal a process SYNOPSIS
kill [-s signal_name] pid ... kill -l [exit_status] kill -signal_name pid ... kill -signal_number pid ... DESCRIPTION
The kill utility sends a signal to the processes specified by the pid operands. Only the super-user may send signals to other users' processes. The options are as follows: -s signal_name A symbolic signal name specifying the signal to be sent instead of the default TERM. -l [exit_status] If no operand is given, list the signal names; otherwise, write the signal name corresponding to exit_status. -signal_name A symbolic signal name specifying the signal to be sent instead of the default TERM. -signal_number A non-negative decimal integer, specifying the signal to be sent instead of the default TERM. The following PIDs have special meanings: -1 If superuser, broadcast the signal to all processes; otherwise broadcast to all processes belonging to the user. Some of the more commonly used signals: 1 HUP (hang up) 2 INT (interrupt) 3 QUIT (quit) 6 ABRT (abort) 9 KILL (non-catchable, non-ignorable kill) 14 ALRM (alarm clock) 15 TERM (software termination signal) Some shells may provide a builtin kill command which is similar or identical to this utility. Consult the builtin(1) manual page. EXIT STATUS
The kill utility exits 0 on success, and >0 if an error occurs. EXAMPLES
Terminate the processes with PIDs 142 and 157: kill 142 157 Send the hangup signal (SIGHUP) to the process with PID 507: kill -s HUP 507 SEE ALSO
builtin(1), csh(1), killall(1), ps(1), sh(1), kill(2), sigaction(2) STANDARDS
The kill utility is expected to be IEEE Std 1003.2 (``POSIX.2'') compatible. HISTORY
A kill command appeared in Version 3 AT&T UNIX. BUGS
A replacement for the command ``kill 0'' for csh(1) users should be provided. BSD
April 28, 1995 BSD
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to kill process from file

i have a script that read a file which contains process_id and time that he's in and it lookes like this 0:30 54545 0:44 66788 0:90 23233 i need to read every line in the file and get the time and if the process is greater then 0:30 to kill the process id the script looks like... (17 Replies)
Discussion started by: naamas03
17 Replies

2. Shell Programming and Scripting

how to trap unix signal if the process killed/interupt occured in bash...

hey champs, I have a process running.......i have to catch/trap the signal when the process is being interupted/killed (kill -9 pid) option...... how can i achieve the same thru my process........ let my process is and it supposed to take 13 mins to complete, but due to some problem ,... (15 Replies)
Discussion started by: manas_ranjan
15 Replies

3. Solaris

how do I kill defunct processes?

mqm 17700 16815 0 0:00 <defunct> kill -9 does not work, even as root (10 Replies)
Discussion started by: csaunders
10 Replies

4. UNIX for Advanced & Expert Users

How to generate a 'kill' list

Hi, I want to write a script which can generate a kill list for killing process, program name start with f60.., which have been running for more than 8 hours, the list output should looks like: kill -9 4444176 kill -9 4674520 kill -9 4454180 kill -9 4994523 Can anyone help how to write... (10 Replies)
Discussion started by: victorcheung
10 Replies

5. AIX

a process that never stop

Dears all i have an AIX box in which i am facing a problem with a process as below: /usr/dt/bin/dtexec -open 0 -ttprocid and each time i am killing this process with "kill -9" then it run again after a while. any ideas or solutions will be appreciated. (13 Replies)
Discussion started by: TheEngineer
13 Replies

6. UNIX for Advanced & Expert Users

KILL without PID

Hellow Experts i have one problem. i run one script in backgroun. and i want to kill that script with only script name..... so what's the solution.. for your info my script name is "testscript" n it contains "sleep 100" thanks.... (16 Replies)
Discussion started by: luckypower
16 Replies

7. Shell Programming and Scripting

What does kill $! do?

What does $! return? (13 Replies)
Discussion started by: dipashre
13 Replies

8. HP-UX

Read/kill processes

Hi, I read a set of processes with: ps -eaf|grep oracleTRLV The result is: oracle 23253 1 0 15:14:11 ? 0:00 oracleTRLV (LOCAL=NO) oracle 23301 1 0 15:15:07 ? 0:00 oracleTRLV (LOCAL=NO) oracle 22914 1 0 15:11:19 ? 0:00 oracleTRLV (LOCAL=NO) How to I kill the "oracleTRLV" ones? Is there... (17 Replies)
Discussion started by: NicoMan
17 Replies

9. Shell Programming and Scripting

Help needed in killing a process

I'm trying to kill a process which is in sleep mode and the parent PID is 1 but I can't kill it with "kill -9" command. Is there a way to kill this process without rebooting? Any help will be appreciated. Steve (10 Replies)
Discussion started by: stevefox
10 Replies

10. Shell Programming and Scripting

Test command

hello, i'v trying to use the TEST command and i have some problems with it. i am trying kill all proccess wich is greater than 25. i started with - ps -f | grep -v TTY | awk '{print $4}' but i dont know how to proceed from here.. 10x a lot, Daniel. (11 Replies)
Discussion started by: dadiT
11 Replies

11. Shell Programming and Scripting

Automation of "Kill script by name"

The following "NAME" is the keyword to use to kill all processes containing it. While the command is very useful, it is user-unfriendly to type it in terminal. I've tried alias and make it a shell script but as NAME is inside awk so the problem becomes complicated. Could anybody advise? ps -ef |... (13 Replies)
Discussion started by: watashi
13 Replies

12. Linux

Find a process ID,kill it and restart agent

#!/bin/bash #This shell finds the pid of the hawkagent and kills and restarts to put the rulebase into effect output=`ps aux|grep hawkagent` #The set -- below helps to parse the above ps output into words and $2 gives the 2nd word which is pid set -- $output pid=$2 #Checks if pid of hawkagent... (12 Replies)
Discussion started by: samrat dutta
12 Replies

13. Shell Programming and Scripting

Using awk to kill a process

Hi Guys I am running a small script to find a process id , ask user if they want to kill the process and then action it Yes or no Here is what i have #/bin/bash ps -l | grep -i $1 | awk '{print "Process id of '$1' is "$4""}' echo "Do you want to kill this process (Y/N)" read action... (10 Replies)
Discussion started by: johnnybananas
10 Replies

14. Shell Programming and Scripting

Process existence or/and permission

Hi, In a bash script, I'm using kill -0 to test if I have permission to kill a process. There are 3 cases: - the process exists and I have permission: OK - the process doesn't exist and it's OK (because I decided to ignore processes that are already dead). - I don't have permission and I want... (13 Replies)
Discussion started by: chebarbudo
13 Replies

15. UNIX for Beginners Questions & Answers

Kill -9 -1 combination

Good morning, In a Production environment ive seen this command that kills processes kill -9 -1 Because i am in a production environmet i can not execute this comamnd, so i would like to know what is the difference for the conventional kill -9 PID ? Thanks a lot (11 Replies)
Discussion started by: alexcol
11 Replies

Featured Tech Videos