aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/process/pgrep.md
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2024-08-27 23:05:39 +0200
committerJohannes Stoelp <johannes.stoelp@gmail.com>2024-08-27 23:05:39 +0200
commite830fa716bedecbff8c3a572d1d20061342ec4c7 (patch)
tree03539ff9da6e494a2f652cbcd48d69d635ff8ca5 /src/process/pgrep.md
parentf5178ed1e419cfae7679ae8b4d3130ef48abfbfd (diff)
downloadnotes-e830fa716bedecbff8c3a572d1d20061342ec4c7.tar.gz
notes-e830fa716bedecbff8c3a572d1d20061342ec4c7.zip
mv monitor -> process
Diffstat (limited to 'src/process/pgrep.md')
-rw-r--r--src/process/pgrep.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/process/pgrep.md b/src/process/pgrep.md
new file mode 100644
index 0000000..b2cf466
--- /dev/null
+++ b/src/process/pgrep.md
@@ -0,0 +1,16 @@
+# 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
+ -x match exactly
+```
+
+## Debug newest process
+For example attach gdb to newest zsh process from `$USER`.
+```markdown
+gdb -p $(pgrep -n -u $USER zsh)
+```