简体   繁体   中英

Kill all sleep processes

How do I kill all sleep processes that are running? I realize that I can either use the kill command to kill each process via its PID, or I can use pkill to kill the sleep command by name. I'm trying to figure out how I would do this, any help would be appreciated. I used

man pkill

to get some help but am still unsure.

如果您确实必须执行此危险操作,请使用killall命令:

killall sleep

There is an option for the pkill command that will kill all processes named the given pattern.

pkill -x [pattern] (or) pkill -exact [pattern]

These commands will kill all processes with the same name as [pattern]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM