From 3b226d19bb19a87eb565f3e1d16e14f446b56e76 Mon Sep 17 00:00:00 2001 From: johannst Date: Tue, 27 Aug 2024 22:25:00 +0000 Subject: deploy: 9b47b98b7c5efce0bf50d57aa5d7e374bcbabf23 --- process/pgrep.html | 242 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 242 insertions(+) create mode 100644 process/pgrep.html (limited to 'process/pgrep.html') diff --git a/process/pgrep.html b/process/pgrep.html new file mode 100644 index 0000000..f3d66be --- /dev/null +++ b/process/pgrep.html @@ -0,0 +1,242 @@ + + + + + + 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
+  -x         match exactly
+
+

Debug newest process

+

For example attach gdb to newest zsh process from $USER.

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