Software:find (Windows)

From HandWiki

find
ReactOS-0.4.13 find command 667x434.png
The ReactOS find command
Developer(s)Microsoft, IBM, DR, Datalight, Novell, Jim Hall, ReactOS Contributors
Initial releaseMarch 1983; 41 years ago (1983-03)
Written inMS-DOS: x86 assembly language
FreeDOS, ReactOS: C
Operating systemMS-DOS, PC DOS, FlexOS, SISNE plus, DR DOS, ROM-DOS, FreeDOS, 4690 OS, Windows, OS/2, eComStation, ArcaOS, ReactOS
PlatformCross-platform
TypeCommand
LicenseMS-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,[4] Digital Research FlexOS,[5] IBM/Toshiba 4690 OS,[6] IBM OS/2,[7] Microsoft Windows,[8] and ReactOS.[9] On MS-DOS, the command is available in versions 2 and later.[10] DR DOS 6.0[11] and Datalight ROM-DOS[12] include an implementation of the find command. The FreeDOS version was developed by Jim Hall and is licensed under the GPL.[13]

The Unix command find performs an entirely different function, analogous to forfiles on Windows. The rough equivalent to the Windows find is the Unix grep.[14]

Syntax

FIND [/V] [/C] [/N] [/I] "string" drive:][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 prompt or 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

References

  1. Paterson, Tim (2013-12-19). "Microsoft DOS V1.1 and V2.0: /msdos/v20source/FIND.ASM". Computer History Museum, Microsoft. http://www.computerhistory.org/atchm/microsoft-research-license-agreement-msdos-v1-1-v2-0/. 
  2. Shustek, Len (2014-03-24). "Microsoft MS-DOS early source code". http://www.computerhistory.org/atchm/microsoft-ms-dos-early-source-code/. 
  3. "Find - Search for text - Windows CMD - SS64.com". https://ss64.com/nt/find.html. 
  4. Jamsa, Kris A. (1993), DOS: The Complete Reference, Osborne McGraw-Hill, p. 206, ISBN 0078819040, https://books.google.com/books?id=UW9GAAAAYAAJ. 
  5. "FlexOS User's Guide". 1986. http://www.bitsavers.org/pdf/digitalResearch/flexos/1073-2003_FlexOS_Users_Guide_V1.3_Nov86.pdf. 
  6. "Users guide". https://archive.org/details/4690OSV6r2UsersGuide/page/n169. 
  7. "JaTomes Help - OS/2 Commands". http://www.jatomes.com/Help/Os2Cmd.php#FIND. 
  8. "Find". https://technet.microsoft.com/en-us/library/bb490906.aspx. 
  9. "reactos/reactos". 3 January 2022. https://github.com/reactos/reactos. 
  10. Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition. Microsoft Press. 2003. ISBN 0-7356-1812-7. 
  11. DR DOS 6.0 User Guide Optimisation and Configuration Tips
  12. "Datalight ROM-DOS User's Guide". https://www.datalight.com/assets/files/ROM-DOS_Users_Guide.pdf. 
  13. "ibiblio.org FreeDOS Package -- find (FreeDOS Base)". http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/find.html. 
  14. "Equivalent of UNIX Grep command in Dos/Windows". January 26, 2009. https://www.tipsandtricks-hq.com/equivalent-of-unix-grep-command-in-doswindows-726. 

Further reading

  • Special Edition Using MS-DOS 6.22, Third Edition. Que Publishing. 2001. 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