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

ps: Add -u option, to list processes associated with specified users

This commit is contained in:
Sam Atkins 2023-05-15 17:28:48 +01:00 committed by Andreas Kling
parent cf998bc082
commit be71ccb690
2 changed files with 19 additions and 1 deletions

View file

@ -5,7 +5,7 @@ ps - list currently running processes
## Synopsis
```**sh
$ ps [--version] [-a] [-A] [-e] [-f] [-p pid-list] [-q pid-list]
$ ps [--version] [-a] [-A] [-e] [-f] [-p pid-list] [-q pid-list] [-u user-list]
```
## Description
@ -20,6 +20,7 @@ For each process, print its PID (process ID), to which TTY it belongs, and invok
* `-f`: Also print for each process: UID (as resolved username), PPID (parent PID), and STATE (Runnable, Sleeping, Selecting, Reading, etc.)
* `-p pid-list`: Only consider the given PIDs, if they exist. `pid-list` is a list of PIDs, separated by commas or spaces.
* `-q pid-list`: Only consider the given PIDs, if they exist. Output the processes in the order provided by `pid-list`. `pid-list` is a list of PIDs, separated by commas or spaces.
* `-u user-list`: Only consider processes for the given users, if they exist. `user-list` is a list of UIDs or login names, separated by commas or spaces.
## Examples