How about "different, not better"?
fuser -kn tcp $PORT_NUMBER will try to drop a kill -9 on any process using the specified TCP port.
fuser -kn tcp $PORT_NUMBER
kill -9
Out of deference to Ben Sinclair's thoughtful counsel you can also specify a signal like this: fuser -$SIGNAL_NUMBER_OR_NAME -kn tcp $PORT_NUMBER
fuser -$SIGNAL_NUMBER_OR_NAME -kn tcp $PORT_NUMBER
Tried playing around with this and read up on the man page. Seems like it doesn't know about options -k or -n (-kn). I tried variations and none worked.
How does that old joke about IT standards go, again? : \
The GNU fuser implementation from psmisc accepts -n and -k options, but distribution is far from universal.
fuser
ya figured that was the case lol.
I want this to work for you.
We're a place where coders share, stay up-to-date and grow their careers.
How about "different, not better"?
fuser -kn tcp $PORT_NUMBERwill try to drop akill -9on any process using the specified TCP port.Out of deference to Ben Sinclair's thoughtful counsel you can also specify a signal like this:
fuser -$SIGNAL_NUMBER_OR_NAME -kn tcp $PORT_NUMBERTried playing around with this and read up on the man page. Seems like it doesn't know about options -k or -n (-kn). I tried variations and none worked.
How does that old joke about IT standards go, again? : \
The GNU
fuserimplementation from psmisc accepts -n and -k options, but distribution is far from universal.ya figured that was the case lol.
I want this to work for you.