#TIL #unix #grep 모든 하위 디렉터리에서 원하는 확장자만

grep -r --include='*.txt' --include='*.xml' texthere .

모든 하위 디렉터리를 읽고 싶다면 -r 옵션을 사용하면 된다.

확장자를 지정하고 싶다면 --include 옵션을 사용.

Updated <2016-09-01 Thu> --include *.txt 옵션이 emacs windows에서 동작 안 해 수정

Feedback plz <3 @ohyecloudy, ohyecloudy@gmail.com

A Random Post