Link to home
Start Free TrialLog in
Avatar of slim7
slim7

asked on

Searching for string in wildcard search

I'm try to do a search for a substring (i.e. 'transaction') in any file in a mount point.  For example, I'd like it to look through each file in the directory and show which file has the word 'transaction' in it.  Is there an easy way to do this?
Avatar of Kent Olsen
Kent Olsen
Flag of United States of America image


find <directoryname> -name '*transaction*'


Good Luck,
Kent
Avatar of slim7
slim7

ASKER

Actually i'm looking for the word 'transaction' within the file.  I think the 'find' works searches the file name.

Sorry.

grep -r transaction /path/*


Kent


Avatar of slim7

ASKER

our unix box doesn't recognize the -r,  I tried egrep -i 'transaction' * and that seemed to work.  what's the difference between grep and egrep?
ASKER CERTIFIED SOLUTION
Avatar of Tintin
Tintin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial