netstat –aon | find "<port number>"Example:netstat -ano -t | findstr LISTENING | findstr :8080
now kill using taskkill command
taskkill /F /pid xxx
or kill by name for example.
taskkill /im notepad.exe
Tip: to find a string in a file using findstr:findstr /i "helloworld" abc.txtorfindstr /i "^hell*rld" abc.txt
------------------------------
Linux:
my best command:
netstat -tulpen
example:
netstat -tulpn | grep LISTEN | grep '(8080 |8081 |8082 | xxx)'
or
$ lsof -i tcp:1555
No comments:
Post a Comment