blob: 2b52a73c00014dfd064f32f66d5a284f62cb6637 (
plain) (
tree)
|
|
# 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
```
## Debug newest process
For example attach gdb to newest zsh process from `$USER`.
```markdown
gdb -p $(pgrep -n -u $USER zsh)
```
|