
종종 명령 이름이 변경된 프로세스를 종료하고 싶을 때가 있습니다(나는 생각한다 setproctitle()
또는 비슷한 것).
명백한 pkill
, pgrep
및 친구들은 새로운 명령 이름을 읽지 않습니다(즉, Ruby 프로세스는 명령 이름을 바꾸지만 pkill은 여전히 그것을 로 보고 ruby
아닌 것으로 봅니다 delayed_job
).
그러나 그렇게 ps
하십시오 h?top
.
내 유일한 리조트가 이러한 종류의 프로세스를 죽이기 위해 노력하고 있습니까? ps
아니면 뭔가 빠졌습니까?
답변1
ps -f
, pgrep -f
및 을 사용해 보십시오 pkill -f
.
해당 매뉴얼 페이지에서:
ps -f
Do full-format listing. This option can be combined with many
other UNIX-style options to add additional columns. It also
causes the command arguments to be printed.
-
pgrep/pkill -f, --full
The pattern is normally only matched against the process name.
When -f is set, the full command line is used.