Skip to main content
deleted 1 characters in body
Source Link
Michael Mrozek
  • 95.8k
  • 40
  • 245
  • 236

Never never do a kill -9 1kill -9 1. Also Also avoid doing a kill on certain processes like mountmount`. When When I have to kill a lot of processes ( saysay for example an X session gets hung and I have to kill all the processes of a certain user  ), I reverse the order of the processes: eg. For example:

ps -ef|remove all processes not matching a certain criteria| awk '{print $2}'|ruby -e '$A=stdin.readlines; A.reverse.each{|a| puts "kill -9 #{a}"}'|bash

ps -ef|remove all processes not matching a certain criteria| awk '{print $2}'|ruby -e '$A=stdin.readlines; A.reverse.each{|a| puts "kill -9 #{a}"}'|bash 

Keep in mind that killkill does not stop a process and release it'sits resources. All it does is send a SIGKILL signal to the process,process; you could wind up with a process that's hung.

Never never do a kill -9 1. Also avoid doing a kill on certain processes like mount. When I have to kill a lot of processes ( say for example an X session gets hung and I have to kill all the processes of a certain user  ), I reverse the order of the processes: eg.

ps -ef|remove all processes not matching a certain criteria| awk '{print $2}'|ruby -e '$A=stdin.readlines; A.reverse.each{|a| puts "kill -9 #{a}"}'|bash

Keep in mind that kill does not stop a process and release it's resources. All it does is send a SIGKILL signal to the process, you could wind up with a process that's hung.

Never never do a kill -9 1. Also avoid doing a kill on certain processes like mount`. When I have to kill a lot of processes (say for example an X session gets hung and I have to kill all the processes of a certain user), I reverse the order of the processes. For example:

ps -ef|remove all processes not matching a certain criteria| awk '{print $2}'|ruby -e '$A=stdin.readlines; A.reverse.each{|a| puts "kill -9 #{a}"}'|bash 

Keep in mind that kill does not stop a process and release its resources. All it does is send a SIGKILL signal to the process; you could wind up with a process that's hung.

Source Link
HandyGandy
  • 2.2k
  • 4
  • 24
  • 30

Never never do a kill -9 1. Also avoid doing a kill on certain processes like mount. When I have to kill a lot of processes ( say for example an X session gets hung and I have to kill all the processes of a certain user ), I reverse the order of the processes: eg.

ps -ef|remove all processes not matching a certain criteria| awk '{print $2}'|ruby -e '$A=stdin.readlines; A.reverse.each{|a| puts "kill -9 #{a}"}'|bash

Keep in mind that kill does not stop a process and release it's resources. All it does is send a SIGKILL signal to the process, you could wind up with a process that's hung.