new -o option: only the oldest that matches

This commit is contained in:
albert
2002-10-23 07:53:16 +00:00
parent 7f68f2504c
commit 501e740a31
4 changed files with 48 additions and 15 deletions

12
pgrep.1
View File

@@ -7,13 +7,13 @@
pgrep, pkill \- look up or signal processes based on name and other attributes
.SH SYNOPSIS
pgrep [\-flnvx] [\-d \fIdelimiter\fP] [\-P \fIppid\fP,...] [\-g \fIpgrp\fP,...]
pgrep [\-flvx] [\-d \fIdelimiter\fP] [\-n|\-o] [\-P \fIppid\fP,...] [\-g \fIpgrp\fP,...]
.br
[\-s \fIsid\fP,...] [\-u \fIeuid\fP,...] [\-U \fIuid\fP,...] [\-G \fIgid\fP,...]
.br
[\-t \fIterm\fP,...] [\fIpattern\fP]
pkill [\-\fIsignal\fP] [\-fnvx] [\-P \fIppid\fP,...] [\-g \fIpgrp\fP,...]
pkill [\-\fIsignal\fP] [\-fvx] [\-n|\-o] [\-P \fIppid\fP,...] [\-g \fIpgrp\fP,...]
.br
[\-s \fIsid\fP,...] [\-u \fIeuid\fP,...] [\-U \fIuid\fP,...] [\-G \fIgid\fP,...]
.br
@@ -61,6 +61,10 @@ List the process name as well as the process ID. (\fBpgrep\fP only.)
Select only the newest (most recently started) of the matching
processes.
.TP
\-o
Select only the oldest (least recently started) of the matching
processes.
.TP
\-P \fIppid\fP,...
Only match processes whose parent process ID is listed.
.TP
@@ -137,8 +141,8 @@ The running \fBpgrep\fP or \fBpkill\fP process will never report
itself as a match.
.SH BUGS
The options \-n and \-v can not be combined. Let me know if you need
to do this.
The options \-n and \-o and \-v can not be combined. Let me know if
you need to do this.
Defunct processes are reported.