쉘에서 하위디렉토리에서 특정 문자열 검색후 파일명,라인 출력하기

페이지 정보

profile_image
작성자 하우코드
댓글 0건 조회 274회 작성일 21-07-07 08:00

본문

vi /usr/sbin/gp
find . -type f | xargs grep -n --color=auto "$1"

chmod 777  /usr/sbin/gp

사용은 gp 문자열...

vi /usr/sbin/gpp
find . -type f -name '*.php' | xargs grep -n --color=auto "$1"

chmod 777  /usr/sbin/gpp

사용은 gpp 문자열... (php 파일만 찾는다)

댓글목록

등록된 댓글이 없습니다.