step1:使用netstat -abno|findstr "端口号",找到对应的pid。
step2:根据pid使用tasklist | findstr "pid",找到正确的进程的名字再次确认该进程占用了端口。
step3:使用taskkill /pid pid关掉该程序。
dir /s/b c:\ |findstr /I "python.exe"
- 先查看进程pid: ps -ef | grep 进程名
- 通过pid查看占用端口: netstat -nap | grep 进程pid
- 杀掉进程: kill -9
find . -type "file" -name "." | xargs grep -i "njz"