-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmurder.1
More file actions
137 lines (135 loc) · 2.65 KB
/
Copy pathmurder.1
File metadata and controls
137 lines (135 loc) · 2.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
.TH MURDER 1 "February 2026" "murder" "User Commands"
.SH NAME
\fBmurder\fR \- smart Linux process killer
Inspired by Evan Hahn's murder script
.SH SYNOPSIS
murder [\-hfqoncr] PID|NAME|:PORT
.SH OPTIONS
.TP
\fB\-h, \-\-help\fR
.br
Show help message
.TP
\fB\-f, \-\-force\fR
.br
Kill without confirmation
.TP
\fB\-q, \-\-quiet\fR
.br
Quiet mode (minimal output)
.TP
\fB\-o, \-\-one\fR
.br
Kill only the specified process, not the entire tree
.TP
\fB\-c, \-\-name\-only\fR
.br
Search by process name only (not full command line)
.TP
\fB\-n, \-\-dry\-run\fR
.br
Show what would be killed without actually killing
.TP
\fB\-r, \-\-reverse\fR
.br
Kill parent processes before children
.br
.br
Default is children first (usually safer)
.SH ARGUMENTS
.TP
\fBPID\fR
.br
Process ID to kill (e.g., 1234)
.TP
\fBNAME\fR
.br
Process name to kill (e.g., python, emacs, firefox)
.TP
\fB:PORT\fR
.br
Port number to kill process on (e.g., :3000)
.SH EXAMPLES
.TP
\fBmurder 1234\fR
.br
Kill process with PID 1234
.TP
\fBmurder \-f ruby\fR
.br
Kill all ruby processes without asking
.TP
\fBmurder \-q :3000\fR
.br
Kill process on port 3000 quietly
.TP
\fBmurder \-fq python\fR
.br
Kill python processes without asking and quietly
.TP
\fBmurder \-nf firefox\fR
.br
Show what would be killed (search by full command)
.TP
\fBmurder \-nfc firefox\fR
.br
Show what would be killed (search by name only)
.TP
\fBmurder \-nfq firefox\fR
.br
Show what would be killed with minimal output
.SH NOTES
.SS Signal escalation
\fBmurder\fR uses graduated signals with timeouts:
.TP
\fBSIGTERM (15)\fR
.br
wait 3 seconds
.TP
\fBSIGINT (2)\fR
.br
wait 3 seconds
.TP
\fBSIGHUP (1)\fR
.br
wait 4 seconds
.TP
\fBSIGKILL (9)\fR
.br
no wait
.P
\fBmurder\fR verifies the process exists and hasn't been replaced (PID reuse) both before and after each signal. If the process dies during escalation, it stops sending further signals
.SS Process tree
By default, \fBmurder\fR kills the entire process tree. It finds all descendants by parsing \fI/proc/*/stat\fR and kills them in order: children first
Use \fB\-r\fR to change order
.br
Use \fB\-o\fR to kill only the specified process
.SS Search behavior
.TP
\fBPID mode\fR
.br
Direct kill by process ID
.TP
\fBNAME mode\fR
.br
Searches \fBps -eo command\fR (or \fBps -eo comm\fR with \fB\-c\fR)
Matches substring, excludes itself (won't kill murder process)
.TP
\fB:PORT mode\fR
.br
Uses \fBss\fR first, falls back to \fBlsof\fR
.SH REQUIREMENTS
.TP
\fBPerl 5.005 or higher\fR
.br
Usually pre-installed on any Linux system
.TP
\fBps\fR
.br
Standard Unix tool (pre-installed)
.TP
\fBlsof\fR or \fBss\fR
.br
Optional, required only for port killing mode (:PORT)
.SH SEE ALSO
kill(1), pkill(1), lsof(8), ss(8)