Wednesday, July 13, 2005

FINDSTR - things I did not know about Windows 2000

Why didn't someone tell me about FINDSTR?

For the past, oh, few years I've been managing Windows servers. Once in a great while I need to search a file for a specific string of text. I've been using cygwin for this using cat and grep and it just works.

A few minutes ago I was reading the doc for this tool and read this bit of text
This switch has PsLogList print Event Log records one-per-line, with comma delimited fields. This format is convenient for text searches, e.g. psloglist | findstr /i text, and for importing the output into a spreadsheet.

Hunh. FINDSTR. That's a funny place holder for 'find string' ... and the truth dawns. I login to the my server and lo. FINDSTR is a command line tool that's been slinking around on every single Windows server I've used for the past three years.

Lesson (re)learned: you don't know everything, some days you know much less than that.
blog comments powered by Disqus