Created
November 7, 2014 12:41
-
-
Save jay-lannister/336e3e32e0977ff1dcf1 to your computer and use it in GitHub Desktop.
프로세스 이름을 이용해 프로세스 죽이기
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://www.howtogeek.com/howto/ubuntu/kill-a-process-by-process-name-from-ubuntu-command-line/ | |
# http://stackoverflow.com/questions/8594653/killing-all-process-from-command-line | |
# | |
# Side note - | |
# | |
# kill -9 is overkill (no pun intended) because it prevents the killed process from running cleanup (e.g., atexit() calls, like the difference between exit and _exit). It may or may not be a problem with firefox, but in general consider trying "kill -9" only after plain "kill" fails. | |
# kill | |
## case-sesitive | |
kill -KILL $(pgrep TextMate) | |
## case-insesitive | |
kill -KILL $(pgrep textmate) | |
## another versions | |
kill -KILL $(ps -x | grep 'firefox' | awk '{print $1}') | |
ps -ef | grep '[f]irefox' | awk '{print $1}' | xargs kill -9 ; | |
ps -ef | awk '/[f]irefox/ {print $1}' | xargs kill -9 ; | |
# killall | |
## case-sesitive | |
killall -v irssi | |
# pkill | |
## case-sesitive | |
pkill TextMate | |
## case-insesitive | |
pkill textmate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment