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

1번째 줄: 1번째 줄:
;Ps -ef PID 정확히 grep하기
{{소문자}}
;ps -ef PID 정확히 grep하기


==방법 1: grep==
==방법 1: grep==

2014년 2월 3일 (월) 13:38 판

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 }}