3 ms·
I would just recommend pkill: https://en.wikipedia.org/wiki/Pkill https://en.wikipedia.org/wiki/Pkill
by CaptSpify 9y ago
I would just recommend pkill: https://en.wikipedia.org/wiki/Pkill https://en.wikipedia.org/wiki/Pkill
- stephen82 9y agoI tend to use the following command: kill -HUP $(pidof SomeDaemon) and if it insists on running, I use: sudo kill -9 $(pidof SomeDaemon) That's it, really.
- jsmthrowaway 9y agopgrep is also useful if you're not trying to kill. They're both from Solaris, and if you have one, you have the other. pgrep | xargs can also be very useful on occasion, depending on what you're doing (mainly debugging).
- vidoc 9y ago> xargs can also be very useful on occasion yes, and xargs has a particularly useful argument -P that allows to do stuff in parallel and probably deserves more love :P
- fanf2 9y agoTop tip! `pkill -v` is not verbose mode! Remember pkill is next to pgrep...