From 2a064a9d1bbb8de6ce489b685cce026eee167cd2 Mon Sep 17 00:00:00 2001 From: johannst Date: Tue, 17 Mar 2020 22:48:49 +0000 Subject: deploy: fb719f52b73920fb18c7f3080ebb1fc73300be49 --- pgrep.html | 230 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 230 insertions(+) create mode 100644 pgrep.html (limited to 'pgrep.html') diff --git a/pgrep.html b/pgrep.html new file mode 100644 index 0000000..1d533ae --- /dev/null +++ b/pgrep.html @@ -0,0 +1,230 @@ + + + + + + pgrep - Notes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

pgrep(1)

+
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.

+
gdb -p $(pgrep -n -u $USER zsh)
+
+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3