Windows package kills process

TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING       3808

How to kill this process with pid?

my team:

for /f "delims=, tokens=5" %%a in ('netstat -ano | findstr 0.0.0.0:8080') do ( taskkill /f /pid %%a )
+4
source share
1 answer

You are close! You do not have enough of that channel symbol |should be shielded in batch mode using a carriage ^, and that the arguments ( delimsand tokens) are not separated by the character ,. In fact, you can completely abandon dividends.

So your command will look like this:

for /f "tokens=5" %%a in ('netstat -ano ^| findstr 0.0.0.0:8080') do (taskkill /f /pid %%a)
+4
source

Source: https://habr.com/ru/post/1670899/


All Articles