Find (Windows) Explained

find
Developer:Microsoft, IBM, DR, Datalight, Novell, Jim Hall, ReactOS Contributors
Programming Language:MS-DOS

x86 assembly language
FreeDOS, ReactOS: C

Operating System:MS-DOS, PC DOS, FlexOS, SISNE plus, DR DOS, ROM-DOS, FreeDOS, 4690 OS, Windows, OS/2, eComStation, ArcaOS, ReactOS
Platform:Cross-platform
Genre:Command
License:MS-DOS: MIT
FreeDOS, ReactOS: GPLv2+

find is a shell command that searches for text in files and prints matching lines to standard output.[1] [2]

The command is available in DOS, Digital Research FlexOS,[3] IBM/Toshiba 4690 OS,[4] IBM OS/2,[5] Windows,[6] and ReactOS.[7] On MS-DOS, the command is available in versions 2 and later.[8] DR DOS 6.0[9] and Datalight ROM-DOS[10] include an implementation of the command. The FreeDOS version was developed by Jim Hall and is licensed under the GPL.[11]

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.[12]

Use

The command syntax can be described as:

find [/v] [/c] [/n] [/i] "TEXT" [PATH...]

"TEXT"
  • Text to find. Must be enclosed in quotes. Notably, matching does not support wildcard characters.[13]
    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.

    C:\>find "Important" Foo

    Further reading

    External links

    Notes and References

    1. Web site: Tim. Paterson. Tim Paterson. Microsoft DOS V1.1 and V2.0: /msdos/v20source/FIND.ASM. Computer History Museum, Microsoft. 2013-12-19. 1983. 2015-10-01.
    2. Web site: Microsoft MS-DOS early source code. Software Gems: The Computer History Museum Historical Source Code Series. Len. Shustek. 2014-03-24. 2015-10-01.
    3. Web site: FlexOS User's Guide . 1986 . www.bitsavers.org . 2020-09-14 . 2019-09-25 . https://web.archive.org/web/20190925131719/http://bitsavers.org/pdf/digitalResearch/flexos/1073-2003_FlexOS_Users_Guide_V1.3_Nov86.pdf . dead .
    4. Web site: Users guide. archive.org. 2020-09-14.
    5. Web site: JaTomes Help - OS/2 Commands . 2019-07-20 . 2019-04-14 . https://web.archive.org/web/20190414130029/http://www.jatomes.com/Help/Os2Cmd.php#FIND . dead .
    6. Web site: Find . 2017-08-26 . 2017-08-26 . https://web.archive.org/web/20170826163346/https://technet.microsoft.com/en-us/library/bb490906.aspx . dead .
    7. Web site: reactos/reactos. GitHub. 3 January 2022.
    8. Book: Wolverton. Van. Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition. 2003. Microsoft Press. 0-7356-1812-7.
    9. https://www.4corn.co.uk/archive/docs/DR%20DOS%206.0%20User%20Guide-opt.pdf DR DOS 6.0 User Guide Optimisation and Configuration Tips
    10. Web site: Datalight ROM-DOS User's Guide. www.datalight.com.
    11. Web site: ibiblio.org FreeDOS Package -- find (FreeDOS Base). www.ibiblio.org.
    12. Web site: Equivalent of UNIX Grep command in Dos/Windows. January 26, 2009.
    13. Web site: Find - Search for text - Windows CMD - SS64.com. ss64.com.