New features in grep

Tags:

http://www.linux.com/article.pl?sid=06/05/19/1920231

칼라로 매칭 결과 보여주며 페이징

grep --color=always "regexp" myfile | less -R 

*.txt 만 /usr/local/src 밑으로 찾기. –exclude도 있음.

grep -r --include=*.txt linux /usr/local/src 

/ 밑의 모든 파일 찾기. –device=skip은 /dev 밑의 디바이스는 스킵하도록하기 위해. default는 –device=read임.

grep -r --device=skip linux / 

Comments

One response to “New features in grep”

  1. 무책 Avatar

    호, 예전에 find /usr/local/src -name “*.txt” -exec grep linux {} \; 이렇게 찾던 것이 훨 쉬워졌군요.

Leave a Reply

Your email address will not be published. Required fields are marked *