ZAP(1)

NAME
zap - interactive process killer

SYNOPSIS
zap [-d] [-f] [-y] [-s -signal] [string ...]

DESCRIPTION
Zap takes one or more command strings, looks for each in the output of a ps command that it runs, and for each process whose ps line matches the string, prints the line as a prompt. If you reply with a y, the program attempts to deliver a signal number -signal to the given process. If a zero-length string is given, then every process will be prompted for.

The [-y] or [-f] option makes the program non-interactive, that is, tells the program to just do it, not to ask for confirmation.

The [-s -signal] option takes either a numeric argument, which is the signal number to send, or a signal name, in either upper case or lower case. For example [-s -usr1] would send the SIGUSR1 signal. In the absence of this option, SIGTERM is sent.

The [-d] option enables debugging printout of program activity.

EXAMPLES
zap pppd
Assuming you have permissions, will send a TERMinate signal to any and all pppd processes.

SEE ALSO
ps(1), kill(1), /usr/include/sys/signal.h.

HISTORY
The zap command first appeared in the book The UNIX Programming Environment, Kernighan and Pike, 1984, Prentice-Hall. Brian Kernighan arranged for its release from Lucent Technologies around 1998, and it appeared in the OpenBSD 2.3 ports tree.

AUTHORS
Brian Kernighan and Rob Pike - original program. Ian Darwin - this manual page, and the [-y] and [-s -signum] arguments in the main program, and the entirety of the /proc version which is included in the source code distribution.

BUGS
Perhaps the ps (1)- using version and the /proc version should be reconciled and merged into a single source file.