Linux/명령어 2012. 9. 20. 11:23

1. 파일 내용 검색 검색

find 경로 -name "*.확장자" | xargs grep 검색패턴


ex) 

> find ../ -name "*.txt" | xargs grep "[debug] test:"


2. 파일 내용 수정

find 경로 -name "*.확장자" -exec perl -pi -e 정규식 {} \;


ex)

> find ./ -name "*.php" -exec perl -pi -e 's/www\/old/www\/new/g' {} \;


'Linux > 명령어' 카테고리의 다른 글

파티션 파일시스템 확인  (0) 2012.07.25
파일 시스템 용량 관련  (0) 2012.07.03
posted by hani^___^
: