Microsoft
Software
Hardware
Network
Question : Perform wildcard search in log files
I have a ton of email log files that are currently in .txt format. I want to search for a text string using a wildcard expression. It looks like the default search tool that comes with Windows does not let you search inside of files with wildcard expressions. If I change the file extension to .csv and then perform a FIND while inside the file, the search appears to works just fine. However, I don't want to have to open up every file to perform the search. I would like to scan the entire directory where the log files reside and find out which log files contain the search string. Is there another tool that can help me accomplish this. My search term would be something similar to this:
RCPT To:<*@domain.com
....where there could be an number of characters in place of the asterik.
Answer : Perform wildcard search in log files
Use the findstr comamnd line tool:
findstr /I /R /M "RCPT To:
[email protected]
" *.txt
It will search all *.txt files for the string and just list the matching file names.The "." right before the @ is the wildcard character.
HTH
Random Solutions
Opinions of test plan for Exchange 2003 bare-metal restore
wmv embedded in Flash 8 plays too fast
dependent module libssl3.so could not be loaded
Win 2003 or SBS R2
Python boa constructor slider widget how to invert min/max
How secure is the tsweb interface ?
Using Goal Seek Function in Access
Sed, Awk or Bash - Pull text out of a line
VMWare ESX 3 - best practices guide
Batch FTP Fetch File