man-pages/man1/killall.1.html
2021-03-31 01:06:50 +01:00

285 lines
6.8 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of KILLALL</TITLE>
</HEAD><BODY>
<H1>KILLALL</H1>
Section: User Commands (1)<BR>Updated: 2018-05-06<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
killall - kill processes by name
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>killall</B>
[<B>-Z</B>,<B>&nbsp;--context</B>
<I>pattern</I>]
[<B>-e</B>,<B>&nbsp;--exact</B>]
[<B>-g</B>,<B>&nbsp;--process-group</B>]
[<B>-i</B>,<B>&nbsp;--interactive</B>]
[<B>-n</B>,<B>&nbsp;--ns</B>
<I>PID</I>]
[<B>-o</B>,<B>&nbsp;--older-than</B>
<I>TIME</I>]
[<B>-q</B>,<B>&nbsp;--quiet</B>]
[<B>-r</B>,<B>&nbsp;--regexp</B>]
[<B>-s</B>,<B>&nbsp;--signal</B>
<I>SIGNAL</I>,&nbsp;<I>-SIGNAL</I>]
[<B>-u</B>,<B>&nbsp;--user</B>
<I>user</I>]
[<B>-v</B>,<B>&nbsp;--verbose</B>]
[<B>-w</B>,<B>&nbsp;--wait</B>]
[<B>-y</B>,<B>&nbsp;--younger-than</B>
<I>TIME</I>]
[<B>-I</B>,<B>&nbsp;--ignore-case</B>]
[<B>-V,</B>&nbsp;--version<B>]</B>
[<B>--</B>]
<I>name ...</I>
<BR>
<B>killall</B>
-l
<BR>
<B>killall</B>
-V,<B>&nbsp;--version</B>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<B>killall</B>
sends a signal to all processes running any of the specified commands.
If no signal name is specified, SIGTERM is sent.
<P>
Signals can be specified either by name (e.g.
<B>-HUP</B>
or
<B>-SIGHUP</B>)
or by number (e.g.
<B>-1</B>)
or by option
<B>-s</B>.
<P>
If the command name is not regular expression (option
<B>-r</B>)
and contains a slash
(<B>/</B>),
processes executing that particular file will be selected for killing,
independent of their name.
<P>
<B>killall</B>
returns a zero return code if at least one process has been killed for
each listed command, or no commands were listed and at least one
process matched the -u and -Z search criteria.
<B>killall</B>
returns non-zero otherwise.
<P>
A
<B>killall</B>
process never kills itself (but may kill other
<B>killall</B>
processes).
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT id="1"><B>-e</B>, <B>--exact</B><DD>
Require an exact match for very long names. If a command name is
longer than 15 characters, the full name may be unavailable (i.e. it
is swapped out). In this case,
<B>killall</B>
will kill everything that matches within the first 15 characters. With
<B>-e</B>,
such entries are skipped.
<B>killall</B>
prints a message for each skipped entry
if
<B>-v</B>
is specified in addition to
<B>-e</B>,
<DT id="2"><B>-I</B>, <B>--ignore-case</B><DD>
Do case insensitive process name match.
<DT id="3"><B>-g</B>, <B>--process-group</B><DD>
Kill the process group to which the process belongs. The kill signal
is only sent once per group, even if multiple processes belonging to
the same process group were found.
<DT id="4"><B>-i</B>, <B>--interactive</B><DD>
Interactively ask for confirmation before killing.
<DT id="5"><B>-l</B>, <B>--list</B><DD>
List all known signal names.
<DT id="6"><B>-n</B>, <B>--ns</B><DD>
Match against the PID namespace of the given PID. The default is to match
against all namespaces.
<DT id="7"><B>-o</B>, <B>--older-than</B><DD>
Match only processes that are older (started before) the time
specified. The time is specified as a float then a unit. The units
are s,m,h,d,w,M,y for seconds, minutes, hours, days, weeks, Months and
years respectively.
<DT id="8"><B>-q</B>, <B>--quiet</B><DD>
Do not complain if no processes were killed.
<DT id="9"><B>-r</B>, <B>--regexp</B><DD>
Interpret process name pattern as a POSIX extended regular expression, per
<B><A HREF="/cgi-bin/man/man2html?3+regex">regex</A></B>(3).
<DT id="10"><B>-s</B>, <B>--signal</B>, <B>-SIGNAL</B><DD>
Send this signal instead of SIGTERM.
<DT id="11"><B>-u</B>, <B>--user</B><DD>
Kill only processes the specified user owns. Command names are
optional.
<DT id="12"><B>-v</B>, <B>--verbose</B><DD>
Report if the signal was successfully sent.
<DT id="13"><B>-V</B>, <B>--version</B><DD>
Display version information.
<DT id="14"><B>-w</B>, <B>--wait</B><DD>
Wait for all killed processes to die.
<B>killall</B>
checks once per second if any of the killed processes still exist and
only returns if none are left. Note that
<B>killall</B>
may wait forever if the signal was ignored, had no effect, or if the
process stays in zombie state.
<DT id="15"><B>-y</B>, <B>--younger-than</B><DD>
Match only processes that are younger (started after) the time
specified. The time is specified as a float then a unit. The units
are s,m,h,d,w,M,y for seconds, minutes, hours, days, weeks, Months and
years respectively.
<DT id="16"><B>-Z</B>, <B>--context</B><DD>
(SELinux Only) Specify security context: kill only processes having
security context that match with given extended regular expression
pattern. Must precede other arguments on the command line. Command
names are optional.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>FILES</H2>
<DL COMPACT>
<DT id="17">/proc<DD>
location of the proc file system
</DL>
<A NAME="lbAG">&nbsp;</A>
<H2>KNOWN BUGS</H2>
Killing by file only works for executables that are kept open during
execution, i.e. impure executables can't be killed this way.
<P>
Be warned that typing
<B>killall</B>
<I>name</I>
may not have the desired effect on non-Linux systems, especially when
done by a privileged user.
<P>
<B>killall -w</B>
doesn't detect if a process disappears and is replaced by a new process
with the same PID between scans.
<P>
If processes change their name,
<B>killall</B>
may not be able to match them correctly.
<P>
<B>killall</B>
has a limit of names that can be specified on the command line. This
figure is the size of an unsigned long multiplied by 8. For most 32
bit systems the limit is 32 and similarly for a 64 bit system the limit
is usually 64.
<A NAME="lbAH">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?1+kill">kill</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?1+fuser">fuser</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?1+pgrep">pgrep</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?1+pidof">pidof</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?1+pkill">pkill</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?1+ps">ps</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?2+kill">kill</A></B>(2),
<B><A HREF="/cgi-bin/man/man2html?3+regex">regex</A></B>(3).
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="18"><A HREF="#lbAB">NAME</A><DD>
<DT id="19"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="20"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="21"><A HREF="#lbAE">OPTIONS</A><DD>
<DT id="22"><A HREF="#lbAF">FILES</A><DD>
<DT id="23"><A HREF="#lbAG">KNOWN BUGS</A><DD>
<DT id="24"><A HREF="#lbAH">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:17 GMT, March 31, 2021
</BODY>
</HTML>