Linux에서 특정 문자가 포함되어 있는 파일 찾기
1 min readJul 9, 2020
보통 소스 코드 내용을 볼 때 특정 문자열이 들어 있는 파일을 찾고 싶은 경우가 있다. grep -rnw '/path/to/somewhere/' -e 'pattern'
grep --include=\*.{c,h} -rnw '/path/to/somewhere/' -e "pattern"
- 특정 확장자 파일만 포함하고자 하는 경우는 위와 같이...
보통 소스 코드 내용을 볼 때 특정 문자열이 들어 있는 파일을 찾고 싶은 경우가 있다. grep -rnw '/path/to/somewhere/' -e 'pattern'
grep --include=\*.{c,h} -rnw '/path/to/somewhere/' -e "pattern"
Distraction-free reading. No ads.
Organize your knowledge with lists and highlights.
Tell your story. Find your audience.
Read member-only stories
Support writers you read most
Earn money for your writing
Listen to audio narrations
Read offline with the Medium app