Search within files using -find-

Today I was looking for the do-file I wrote months ago where I used the -recast- command. I remember that this was the only time (so far) when I used -recast- in my current work. Thus, it seems that the easiest way to find the file is to use a program that searches matching strings within files in a directory. Then I found -find- (Nichols 2009). -find- looks for matching strings across multiple files (if specified) or all files (if no file names are specified) in the current working directory.

cd P:\ResearchPapers\MiddleIncome
find, match(recast)

No files specified; all files in current directory will be searched.
1 matches found in discovery

You may install -find- by typing:

ssc install find

Type “help find” for the complete syntax and options.

Leave a Reply