"Ps -ef PID 정확히 grep하기"의 두 판 사이의 차이

21번째 줄: 21번째 줄:


==같이 보기==
==같이 보기==
*[[PID로 프로세스 이름 알아내기]]
*[[ps -ef]]
*[[ps -ef]]
*[[grep]]
*[[grep]]

2014년 2월 24일 (월) 19:26 판

ps -ef PID 정확히 grep하기

1 방법 1: grep

ps -ef | grep '^\w\+\s\+프로세스아이디\s'
[root@jmnote ~]# ps -ef | grep '^\w\+\s\+10\s'
root        10     2  0 06:00 ?        00:00:00 [watchdog/1]

2 방법 2: awk

ps -ef | awk '$2 ~ /^프로세스아이디$/ {print}'
[root@jmnote ~]# ps -ef | grep '^\w\+\s\+10\s'
root        10     2  0 06:00 ?        00:00:00 [watchdog/1]

3 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}