macos – 从命令行终止所有进程
发布时间:2020-12-15 22:21:53 所属栏目:安全 来源:网络整理
导读:我想从命令行中杀死所有的firefox进程. 例如: MacPro:huangr$ps -x | grep 'firefox' 4147 ttys000 0:00.00 (firefox-bin) 4177 ttys000 0:00.00 (firefox-bin) 4234 ttys000 0:00.00 (firefox-bin) 4273 ttys000 0:00.00 (firefox-bin) 4282 ttys000 0:00.
我想从命令行中杀死所有的firefox进程.
例如: MacPro:huangr$ps -x | grep 'firefox' 4147 ttys000 0:00.00 (firefox-bin) 4177 ttys000 0:00.00 (firefox-bin) 4234 ttys000 0:00.00 (firefox-bin) 4273 ttys000 0:00.00 (firefox-bin) 4282 ttys000 0:00.00 (firefox-bin) 4285 ttys000 0:00.00 (firefox-bin) 4298 ttys000 0:00.00 (firefox-bin) 4301 ttys000 0:00.00 (firefox-bin) 4304 ttys000 0:00.00 (firefox-bin) 4311 ttys000 0:00.00 (firefox-bin) 4317 ttys000 0:00.00 (firefox-bin) 4320 ttys000 0:00.00 (firefox-bin) 4338 ttys000 0:00.00 (firefox-bin) 4342 ttys000 0:00.00 (firefox-bin) 4377 ttys000 0:03.85 /Applications/Firefox.app/Contents/MacOS/firefox-bin -no-remote -foreground 4394 ttys000 0:05.54 /Applications/Firefox.app/Contents/MacOS/firefox-bin -no-remote -foreground 4471 ttys000 0:06.08 /Applications/Firefox.app/Contents/MacOS/firefox-bin -no-remote -foreground 4581 ttys002 0:04.92 /Applications/Firefox.app/Contents/MacOS/firefox-bin -no-remote -foreground 4607 ttys002 0:04.33 /Applications/Firefox.app/Contents/MacOS/firefox-bin -no-remote -foreground 4626 ttys002 0:05.04 /Applications/Firefox.app/Contents/MacOS/firefox-bin -no-remote -foreground 我想一次性杀死所有这些,任何简单的方法吗? 解决方法kill -9 $(ps -x | grep 'firefox' | awk '{print $1}') 应该这样做 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |