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

ps: Allow multiple filtering options to be used simultaneously

Previously, it was assumed that only one filtering option, such as
`-u` or `-p` would be used at a time. With this PR, processes are now
shown if they match any of the specified filters.
This commit is contained in:
Tim Ledbetter 2023-07-09 16:26:08 +01:00 committed by Sam Atkins
parent a758e27153
commit aeb87d6e78
2 changed files with 16 additions and 11 deletions

View file

@ -18,9 +18,9 @@ For each process, print its PID (process ID), to which TTY it belongs, and invok
* `-a`: Consider all processes that are associated with a TTY.
* `-A` or `-e`: Consider all processes, not just those in the current TTY.
* `-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.
* `-p pid-list`: Select processes matching any of the given PIDs. `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.
* `-u user-list`: Select processes matching any of the given UIDs. `user-list` is a list of UIDs or login names, separated by commas or spaces.
## Examples