SaikoTroid
Sunday, June 27, 2010
Finding in files
Finding a string in files is useful and not that straightforward. But don't despair, we have bash.
find . -exec grep -q 'foobar' '{}' \; -print
This searches in the current directory including its subdirectories and finds files that contain foobar.
1 comment:
Body Hammer
August 6, 2010 at 1:05 AM
or just
"grep -r abc *"
Reply
Delete
Replies
Reply
Add comment
Load more...
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
or just
ReplyDelete"grep -r abc *"