Find / xargs / grep 의 절묘한 조합으로 원하는 문자열 검색하기

하위디렉토리까지 찾아내줍니다. 강력합니다.
… 소스코드 분석할때 쓰면 좋을거 같아요^^^

(bionic)soyeomul@localhost:~/iwork/ibus-hangul-master$ find . -name "*.h" | xargs grep -n "define"
./config.h:6:#define ENABLE_NLS 1
./config.h:9:#define GETTEXT_PACKAGE "ibus-hangul"
./config.h:21:#define HAVE_DCGETTEXT 1
./config.h:24:#define HAVE_DLFCN_H 1
./config.h:27:#define HAVE_GETTEXT 1
./config.h:33:#define HAVE_INTTYPES_H 1
./config.h:36:#define HAVE_MEMORY_H 1
./config.h:39:#define HAVE_STDINT_H 1
./config.h:42:#define HAVE_STDLIB_H 1
./config.h:45:#define HAVE_STRINGS_H 1
./config.h:48:#define HAVE_STRING_H 1
./config.h:51:#define HAVE_SYS_STAT_H 1
./config.h:54:#define HAVE_SYS_TYPES_H 1
./config.h:57:#define HAVE_UNISTD_H 1
./config.h:60:#define LT_OBJDIR ".libs/"
./config.h:63:#define PACKAGE "ibus-hangul"
./config.h:66:#define PACKAGE_BUGREPORT "https://github.com/libhangul/ibus-hangul/issues"
./config.h:69:#define PACKAGE_NAME "ibus-hangul"
./config.h:72:#define PACKAGE_STRING "ibus-hangul 1.5.1"
./config.h:75:#define PACKAGE_TARNAME "ibus-hangul"
./config.h:78:#define PACKAGE_URL ""
./config.h:81:#define PACKAGE_VERSION "1.5.1"
./config.h:84:#define STDC_HEADERS 1
./config.h:88:# define _ALL_SOURCE 1
./config.h:92:# define _GNU_SOURCE 1
./config.h:96:# define _POSIX_PTHREAD_SEMANTICS 1
./config.h:100:# define _TANDEM_SOURCE 1
./config.h:104:# define __EXTENSIONS__ 1
./config.h:109:#define VERSION "1.5.1"
./config.h:115:   this defined. */
./src/engine.h:22:#define __ENGINE_H__
./src/engine.h:26:#define IBUS_TYPE_HANGUL_ENGINE	\
./src/i18n.h:22:#define ibus_hangul_i18n_h
./src/i18n.h:26:#define _(str)	    gettext(str)
./src/i18n.h:27:#define N_(str)	    (str)
./src/ustring.h:24:#define nabi_ustring_h
(bionic)soyeomul@localhost:~/iwork/ibus-hangul-master$

[ibus-hangul(서라운딩 패치판) – 두벌식 옛글 모드에서 작성했씁니다]

추가정보]
find 옵션에 “-type f” 를 추가하면 형식이 file 인 것만을 찾습니다.
find 옵션에 -name 대신 -iname 을 쓰면 대소문자 구분없이 검색가능합니다.

[ibus-hangul(서라운딩 패치판)에서 작성했씁니다]