aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pgrep.md
diff options
context:
space:
mode:
authorjohannst <johannes.stoelp@gmail.com>2020-03-17 22:47:33 +0100
committerjohannst <johannes.stoelp@gmail.com>2020-03-17 22:47:33 +0100
commit62c9575f7827fb44f24b90a8f8c9d4f1f9f8f1c7 (patch)
treed7cb2a4aadf8685a29d44cb8530192ae55b686b1 /src/pgrep.md
parent31cf124ef7c82adc57837f8ac71c3f7350e2c66b (diff)
downloadnotes-62c9575f7827fb44f24b90a8f8c9d4f1f9f8f1c7.tar.gz
notes-62c9575f7827fb44f24b90a8f8c9d4f1f9f8f1c7.zip
added pgrep
Diffstat (limited to 'src/pgrep.md')
-rw-r--r--src/pgrep.md15
1 files changed, 15 insertions, 0 deletions
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] <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)
+```