【linux环境】

方法1:截取进程pid,再kill

ps -ef | grep java.endorsed.dirs | grep -v grep | cut -c10-15 | xargs kill -9

 方法2:

1)找到linux下的进程pids

ps -ef  | grep eSight | grep -v grep | awk '{print $2}'

2)循环pids,kill -9 pid

 

【windows】

kill 命令行参数中带tomcat字符串的 java.exe 进程

方法1:

wmic process where (Name="java.exe" AND CommandLine like "%%tomcat%%") call terminate >nul 2>nul

 

方法2:

C:\Users\j00113584>wmic process where name="calc.exe" get Processid ProcessId 6848

C:\Users\j00113584>taskkill /F /PID 6848 成功: 已终止 PID 为 6848 的进程。

 

相关文章:

  • 2021-12-21
  • 2021-12-18
  • 2021-11-10
  • 2022-12-23
  • 2022-12-23
  • 2021-08-20
猜你喜欢
  • 2021-05-27
  • 2022-01-21
  • 2021-11-07
  • 2022-12-23
  • 2021-10-09
  • 2021-10-07
  • 2021-04-07
相关资源
相似解决方案