4 ms·
This is what GPT-4 comes up with: kill $(lsof -t -i :PORT_NUMBER)
by acapybara 3y ago
This is what GPT-4 comes up with:
kill $(lsof -t -i :PORT_NUMBER)
- nikanj 3y agoI like how the install script alone for this tool is much longer than the bash-ism
- silverwind 3y agoI use this, forcibly kill, no logging, never errors, works on mac and linux: kill -9 "$(lsof -t -i:5000)" &>/dev/null || true
- deathanatos 3y ago… and its answer is wrong, for reasons discussed in the very many other threads on this post that suggest this same snippet. (On my laptop, this kills stern, Chrome, Slack, Firefox, and 1Pass…)