Notes on using the kill command in Linux

  
                

There is a command to terminate the process directly under the Linux system. The code of this command is also very domineering. It is directly the kill of English. Since this order has such a "killing", in order to prevent "injury", the following small series will give you a general idea of ​​the use of the kill command in Linux.

Use the kill command precautions

1, when checking a corner of this Bug, you'll find a different place killall command with the kill command: Suppose there is a script test. Pl , the assumption is as follows: #! /usr/bin/perl -w sleep 60;

The test results are as follows: 1. If started by the /home/MNET/m_yancyliu/tmp/x.pl command, the command line under ps is displayed as follows: /usr/bin/perl -w /home/MNET/m_yancyliu/tmp/x.pl

The result is as follows: The killall x.pl command can kill the script,

killall perl command Can't kill the process

2. If started by the /usr/bin/perl -w /home/MNET/myancyliu/tmp/x.pl command, the command line under ps will display: /usr/bin /perl -w /home/MNET/m_yancyliu/tmp/x.pl

The result is as follows: The killall perl command can kill the process

The killall x.pl command cannot kill the process. At this point, if you view the corresponding process tree through the ps uxfww command, you will find that the process tree of the above two startup methods is the same: (If you want to view the process tree of all processes, you can use the command ps axfww) \\ -eash

Copyright © Windows knowledge All Rights Reserved