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+ |
In computing, find
is a command in the command-line interpreters (shells) of a number of operating systems. It is used to search for a specific text string in a file or files. The command sends the specified lines to the standard output device.[1] [2]
Overview
The find
command is a filter to find lines in the input data stream that contain or don't contain a specified string and send these to the output data stream. It does not support wildcard characters.[3]
The command is available in DOS, Digital Research FlexOS,[4] IBM/Toshiba 4690 OS,[5] IBM OS/2,[6] Microsoft Windows,[7] and ReactOS.[8] On MS-DOS, the command is available in versions 2 and later.[9] DR DOS 6.0[10] and Datalight ROM-DOS[11] include an implementation of the command. The FreeDOS version was developed by Jim Hall and is licensed under the GPL.[12]
The Unix command [[Find (Unix)|find]]
performs an entirely different function, analogous to [[forfiles]]
on Windows. The rough equivalent to the Windows find
is the Unix [[grep]]
.[13]
Syntax
FIND [/V] [/C] [/N] [/I] "string" [path]filename[...]]
Arguments:
"string"
This command-line argument specifies the text string to find.
[drive:][path]filename
Specifies a file or files in which to search the specified string.
Flags:
/V
Displays all lines NOT containing the specified string.
/C
Displays only the count of lines containing the string.
/N
Displays line numbers with the displayed lines.
/I
Ignores the case of characters when searching for the string.
Note:If a pathname is not specified, FIND searches the text typed at the promptor piped from another command.
Examples
C:\>find "keyword" < inputfilename > outputfilename
C:\>find /V "any string" FileName
See also
- Findstr, Windows and ReactOS command-line tool to search for patterns of text in files.
- find (Unix), a Unix command that finds files by attribute, very different from Windows
find
- grep, a Unix command that finds text matching a pattern, similar to Windows
find
- forfiles, a Windows command that finds files by attribute, similar to Unix
find
- Regular expression
- List of DOS commands
Further reading
- Book: Cooper. Jim. Special Edition Using MS-DOS 6.22, Third Edition. 2001. Que Publishing. 978-0789725738.
- Book: Kathy Ivens. Brian Proffit. 1993. OS/2 Inside & Out. Osborne McGraw-Hill. 978-0078818714.
- Book: Frisch, Æleen. 2001. Windows 2000 Commands Pocket Reference. O'Reilly. 978-0-596-00148-3.
External links
Notes and References
- 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.
- 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.
- Web site: Find - Search for text - Windows CMD - SS64.com. ss64.com.
- 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 .
- Web site: Users guide. archive.org. 2020-09-14.
- 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 .
- 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 .
- Web site: reactos/reactos. GitHub. 3 January 2022.
- Book: Wolverton. Van. Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition. 2003. Microsoft Press. 0-7356-1812-7.
- 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
- Web site: Datalight ROM-DOS User's Guide. www.datalight.com.
- Web site: ibiblio.org FreeDOS Package -- find (FreeDOS Base). www.ibiblio.org.
- Web site: Equivalent of UNIX Grep command in Dos/Windows. January 26, 2009.