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?
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
find <directoryname> -name '*transaction*'
Good Luck,
Kent