Hacker Times
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
lma21
on April 25, 2023
|
parent
|
context
|
favorite
| on:
Show HN: Killport – CLI tool to kill processes run...
To avoid any unwanted matches with grep (e.g. ports 1999 and 19999), use:
$ lsof -i:$port | grep LISTEN $ kill $pid
addingnumbers
on April 25, 2023
[–]
grep isn't necessary at all here:
lsof -s TCP:LISTEN -i :$port
hdjjhhvvhga
on April 25, 2023
|
parent
[–]
You could also add the -t option for direct piping to kill.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: