Esistono diversi modi per uccidere un processo per nome se lo conosci.Ecco un paio di modi differenti per fare questo.

Abbiamo intenzione di assumere che il processo che stiamo cercando di uccidere si chiama irssi

kill $(pgrep irssi)

 

killall -v irssi

 

pkill irssi

 

kill `ps -ef | grep irssi | grep -v grep | awk ‘{print $2}’`

These techniques can be useful in shell scripts, where you wouldn’t know the process ID and would need to restart or kill a process.

Fonte: http://www.howtogeek.com/howto/ubuntu/kill-a-process-by-process-name-from-ubuntu-command-line/

This page has been readed 669 times

Leave a Reply

Your email address will not be published. Required fields are marked *