find is a shell command that searches for text in files and prints matching lines to standard output. The command is available in DOS, Digital Research FlexOS, IBM/Toshiba 4690 OS, IBM OS/2, Windows, and ReactOS. On MS-DOS, the command is available in versions 2 and later. DR DOS 6.0 and Datalight ROM-DOS include an implementation of the find command. The FreeDOS version was developed by Jim Hall and is licensed under the GPL. Notably, the same-named Unix-based command performs an entirely different function – searching the file system for matching files. This functionality is provided by the forfiles command in an environment with the command of this article. The Unix-based grep command provides a function similar to the command of this article.
Use The command syntax can be described as:
"TEXT" Text to find. Must be enclosed in quotes. Notably, matching does not support wildcard characters. PATH File system path to a file. If none specified, the command searches the text from standard input. /v Display lines not containing the text. /c Display only the count of matching lines. /n Display line numbers with matching lines. /i Ignore the case of characters when searching.
Examples The following command searches file "Foo" for lines that contain "Important" and prints results to standard output.
See also List of DOS commands Regular expression – Sequence of characters that forms a search pattern
References
Further reading Cooper, Jim (2001). Special Edition Using MS-DOS 6.22, Third Edition. Que Publishing. ISBN 978-0789725738. Kathy Ivens; Brian Proffit (1993). OS/2 Inside & Out. Osborne McGraw-Hill. ISBN 978-0078818714. Frisch, Æleen (2001). Windows 2000 Commands Pocket Reference. O'Reilly. ISBN 978-0-596-00148-3.
External links
Open source FIND implementation that comes with MS-DOS v2.0

