ps -ef | grep java | awk{$"print 2"} | args kill - 9
时间: 2023-10-13 21:06:28 浏览: 105
根据引用\[1\]中的内容,命令"ps -ef | grep java | awk '{print $2}' | xargs kill -9"的作用是找到所有包含"java"的进程,并将其进程号传递给"kill -9"命令来终止这些进程。所以,"ps -ef | grep java | awk '{$"print 2"} | args kill - 9"这个命令有一些语法错误。正确的命令应该是"ps -ef | grep java | awk '{print $2}' | xargs kill -9"。这个命令的作用是找到所有包含"java"的进程,并终止它们。
#### 引用[.reference_title]
- *1* [实用的kill脚本(ps -ef | grep keepalived | grep -v grep | awk ‘{print $2}‘ | xargs kill -9)](https://blog.csdn.net/weixin_47658562/article/details/123503907)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [kill -9 `ps -ef|grep cpu|grep -v grep|awk '{print $2}'`命令解析](https://blog.csdn.net/u____/article/details/79859503)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [kill -9 `ps -ef|grep cpu|grep -v grep|awk ‘{print $2}‘`命令解析](https://blog.csdn.net/modi000/article/details/120322347)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文