Razvan's Technology Blog
March 28, 2012
Use grep recursively but selectively
To use grep recursively in a directory structure (e.g, the current directory and all its sub-directories), but only on selected files (e.g., C source files) use the following syntax:
grep --include=*.c -r <TEXT_TO_SEARCH>
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)