News for hackers. Stuff that matters.
Re:A command-line tool to easily kill processes running on a... by corn13read2 on Tuesday April 25, 2023 @09:06AM (#35699907)
I made an amazing CLI utility for this! Simply add this to your .bashrc or .zshrc file:

alias portkill='function killit(){kill -9 "$(lsof -t -i:$1)" &>/dev/null || true};killit'

then run portkill PORT

Re:A command-line tool to easily kill processes running on a... by drchickensalad on Tuesday April 25, 2023 @09:49AM (#35700432)
Why define the alias as a function instead of the whole thing as a function?
Re:A command-line tool to easily kill processes running on a... by blablablub on Tuesday April 25, 2023 @12:29PM (#35702741)
It is amazing, otherwise it would just be normal