Linux: How to kill specific process with it's name?

If you want to find a process named "testapp" and kill it, how can you do this?


ps -ef | grep testapp | head -n 1 | fmt -u | cut -d ' ' -f 2 | xargs kill -9

But, this is too complex solution for simple issue. I just can use 'killall'. Such as 'killall testapp'.
It's still interesting to learn Linux tools to manipulate text data. (such as head, cut, fmt ...)

References:

댓글

이 블로그의 인기 게시물

Wireless: HotSpot 2.0 이란?

Apple M1 Mac Mini에서 이더리움 (Ethereum) 채굴하기

Java: Java for Game? Java가 Game 개발에 어울릴까?