UNIX/Linux 명령어 – grep

$ grep -n '검색할 문자열' ./*

옵션 설명
-n: 행의 번호(line number)를 함께 출력
-l: 패턴이 포함된 파일의 이름을 출력
-r: 재귀적으로(recursively) 모든 서브 디렉토리들까지 탐색

grep에 대한 설명
변수, 함수명 등을 찾을 때 사용할 수 있다.

참고 및 출처
https://ra2kstar.tistory.com/100

Leave a Reply

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