从命令行杀死特定程序的所有实例

Geo*_*rge 25 command-line

有没有办法用命令行命令杀死特定程序的所有实例?

Der*_*ler 50

在 GNU/Linux、BSD、OS X 和其他类 Unix 系统中

killall program
Run Code Online (Sandbox Code Playgroud)

在 Windows 中

taskkill /IM program.exe
Run Code Online (Sandbox Code Playgroud)

  • 小心“其他类 Unix”:在 Solaris 上,`killall`,好吧,*杀死所有*:http://tehtable.wordpress.com/2009/12/07/note-to-self-solaris-linux/ (6认同)