blob: b2cf466b331f2f55c76a515ad52038039d2a6d3b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# pgrep(1)
```markdown
pgrep [opts] <pattern>
-n only list newest matching process
-u <usr> only show matching for user <usr>
-l additionally list command
-a additionally list command + arguments
-x match exactly
```
## Debug newest process
For example attach gdb to newest zsh process from `$USER`.
```markdown
gdb -p $(pgrep -n -u $USER zsh)
```
|