1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:07:47 +00:00

pgrep: Add -o option to display the oldest matching process only

This commit is contained in:
Tim Ledbetter 2023-06-09 17:40:16 +01:00 committed by Andreas Kling
parent 47b530fa71
commit d03aaddb55
2 changed files with 12 additions and 1 deletions

View file

@ -5,7 +5,7 @@ pgrep - look up processes based on name
## Synopsis
```sh
$ pgrep [--count] [-d delimiter] [--ignore-case] [--list-name] [--newest] [--uid uid-list] [--invert-match] [--exact] <process-name>
$ pgrep [--count] [-d delimiter] [--ignore-case] [--list-name] [--newest] [--oldest] [--uid uid-list] [--invert-match] [--exact] <process-name>
```
## Options
@ -15,6 +15,7 @@ $ pgrep [--count] [-d delimiter] [--ignore-case] [--list-name] [--newest] [--uid
* `-i`, `--ignore-case`: Make matches case-insensitive
* `-l`, `--list-name`: List the process name in addition to its pid
* `-n`, `--newest`: Select the most recently created process only
* `-o`, `--oldest`: Select the least recently created process only
* `-U uid-list`, `--uid uid-list`: Select only processes whose UID is in the given comma-separated list. Login name or numerical user ID may be used
* `-x`, `--exact`: Select only processes whose names match the given pattern exactly
* `-v`, `--invert-match`: Select non-matching lines