Sunday, May 5, 2024
8
rated 0 times [  8] [ 0]  / answers: 1 / hits: 956  / 3 Years ago, sat, july 24, 2021, 11:27:55

I have one command (/usr/lib/R/exec/R pathtoDifferentFiles) being executed with many different arguments (file names). Looking at htop, I see at least 30 processes created,



I want to kill all of them at the same time.



Is there a way to kill processes that apply a command starting with a pattern? (/usr/lib/R/exec/R)


More From » command-line

 Answers
0

Try using the pkill command:



pkill --full /usr/lib/R/bin/exec/R


From the pkill man page:




pkill will send the specified signal (by default SIGTERM) to each process.

[...]

-f, --full
The pattern is normally only matched against the process name.
When -f is set, the full command line is
used.


[#25130] Saturday, July 24, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
landarre

Total Points: 254
Total Questions: 96
Total Answers: 109

Location: Burundi
Member since Sun, Apr 16, 2023
1 Year ago
landarre questions
;