This is one of the questions that has troubled me often. Suppose I have thousand or more instances of any process(for e.g. say the process vi) running. How do I kill them all in one single shot/one line command/One command ? Any information provided will be appreciated ?
|
What's wrong with the good old,
There are ways to make that more efficient,
and other variations, but at the basic level, it's always worked for me. |
|||||||
|
|
Use killall,
This will kill all command named 'vi' You might also add a signal as well, e.g SIGKILL
|
|||||||||||||||
|
|
|
|||||||||
|
|
To see the list of PIDs that
Under Linux, you need Another common way to identify processes to kill is the processes that have a certain file open (which can be the process's executable). You can list these with If there's a runaway process that keeps forking, you may need to kill the whole process group at once. A process group is identified by the negative of its leader, which is the ancestor process of all the processes in the group. To see the process group that a process belongs to, run If you can't find a better way, use
Remember that your |
|||
|
|
Why don't you try:
|
|||||||||
|
|
I would suggest you to try pkill. Ex: ps -ef | pkill -f command To show the list of all the processes to be killed first try to pgrep: Ex: ps -ef | pgrep -f command |
|||
|
|
pkillfromprocpspackage. – Deer Hunter Oct 11 '12 at 9:55