Kill the same process name
Ps-efww|grep mtp-v2.0-sss-14d75424ba81113.conf |grep-v grep|cut-c 9-15|xargs kill-9
Description: Pipe symbol "|" Used to separate two commands, the output from the left command of the pipe character is entered as the command to the right of the pipe.
"Ps-efww" is a command to view all processes. At this point the retrieved process will be the input to the next command "grep", and note that to end other programs, replace Vim in the above command with another program name.
Grep-v grep removes the process that contains the keyword "grep" in the listed process.
"Cut-c 9-15" is the 9th character to the 15th character of the input line, which is exactly the process number PID.
The Xargs command in "Xargs kill-9" is used to take the output (PID) of the preceding command as a parameter to the "kill-9" command and execute the command.
The "kill-9" will forcibly kill the specified process, which successfully clears the process with the same name.
Kill the same process name