Redex Redex - 1 year ago 142
Linux Question

How does pkill mask work?

If I have process named

and process named
running and I execute command
pkill raspvid
, does it kill both processes or only process which is named raspvid?

If pkill kills both processes is there any linux-command to do the perfect match?

Answer Source

pkill kills all processes that command pgrep lists with the same parameters. In your case it sends SIGTERM signal to both processes. The following command kills the exactly matching pattern only:

 pkill -x raspivid 
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download