(see ) is a
command-line
A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive command (computing), commands from a user in the form of lines of text. This provides a means of setting parameters for the environment, invokin ...
utility initially written for use with the
Solaris 7 operating system in 1998. It has since been reimplemented for
Linux
Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which i ...
and some
BSDs.
As with the and commands, is used to send
signals to
processes
A process is a series or set of activities that interact to produce a result; it may occur once-only or be recurrent or periodic.
Things called a process include:
Business and management
*Business process, activities that produce a specific se ...
. The command allows the use of extended
regular expression
A regular expression (shortened as regex or regexp; sometimes referred to as rational expression) is a sequence of characters that specifies a search pattern in text. Usually such patterns are used by string-searching algorithms for "find" ...
patterns and other matching criteria.
Example usage
Kill the most recently created process:
pkill -n acroread
Send a
USR1 signal to process:
pkill -USR1 acroread
See also
Some other unix commands related to process management and killing include:
* , which sends signals processes by
process ID instead of by pattern-matching against the name.
* , which changes the priority of a process.
* and , which display a list of processes and their resource usage; can send signals to processes directly from this list.
* , a command-line utility to send signals or report process status. is favoured over it.
References
*
*
External links
Oracle: Man pages pgrep, pkill
{{Unix commands
Unix process- and task-management-related software