4 ms·
This is useful for finding and killing a process. ps -A | grep some text in program name upon getting the pid kill -9 pid
by geekytenny 15y ago
This is useful for finding and killing a process.
ps -A | grep some text in program name
upon getting the pid
kill -9 pid
- bnegreve 15y agoalso check killall programname
- owenmarshall 15y agoBe careful with killall -- BSD and Linux killall does what you say, but SysV killall kills every program on the machine. Most of us probably won't be executing killall on any HPUX or IRIX boxes, but it's still good to know the difference ;)
- aw3c2 15y agopkill pidof
- cpuddle 15y agoInstead of the first, try "pgrep".
- telemachos 15y agoInstead of kill -9 (a nuke), you can often get results with just kill, kill -INT or kill -HUP. (The advantage is that the "weaker" signals allow your runaway program to do some cleanup, but kill -9 doesn't.) There's a nice write-up and a function automating attempts to run increasingly strong signals on this site: http://web.archive.org/web/20080610070315/http://sial.org/howto/shell/kill-9/ http://web.archive.org/web/20080610070315/http://sial.org/ho... (Thank god for the wayback machine. That site was full of good Unix tips and tutorials, but it's gone now.)
- DaveChild 15y agoIt's still there, just without a domain: http://72.14.189.113/ http://72.14.189.113/
- telemachos 15y agoThanks for letting me know. It's still probably easier to use the Wayback Machine since all of the site's internal links point to http://sial.org/ http://sial.org/ so browsing within the site is very painful. Still, I'm glad to see the content is all still online. I may just mirror the whole thing (there's tons of good reference material in there, especially for Perl, but also for Unix generally).