From 62c9575f7827fb44f24b90a8f8c9d4f1f9f8f1c7 Mon Sep 17 00:00:00 2001 From: johannst Date: Tue, 17 Mar 2020 22:47:33 +0100 Subject: added pgrep --- src/pgrep.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/pgrep.md (limited to 'src/pgrep.md') diff --git a/src/pgrep.md b/src/pgrep.md new file mode 100644 index 0000000..2b52a73 --- /dev/null +++ b/src/pgrep.md @@ -0,0 +1,15 @@ +# pgrep(1) + +```markdown +pgrep [opts] + -n only list newest matching process + -u only show matching for user + -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) +``` -- cgit v1.2.3