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>
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment