find (command)

From Wikipedia, the free encyclopedia
Jump to: navigation, search

In computing, find is a command in the command line interpreters (shells) of DOS,[1] OS/2 and Microsoft Windows.[2] 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.[3][4]

The Unix command find performs an entirely different function analogous to dir /s.


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.


FIND [/V] [/C] [/N] [/I] "string" [[drive:][path]filename[...]]


  • "string" This command-line argument specifies the text string to find.
  • [drive:][path]filename Specifies a file or files to search.


  • /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.


find "keyword" < inputfilename > outputfilename

See also[edit]


  1. ^ Jamsa, Kris A. (1993), DOS: The Complete Reference, Osborne McGraw-Hill, p. 206, ISBN 0078819040. 
  2. ^ Microsoft TechNet Find article
  3. ^ Paterson, Tim (2013-12-19) [1983]. "Microsoft DOS V1.1 and V2.0: /msdos/v20source/FIND.ASM". Computer History Museum, Microsoft. Retrieved 2015-10-01. 
  4. ^ Shustek, Len (2014-03-24). "Microsoft MS-DOS early source code". Software Gems: The Computer History Museum Historical Source Code Series. Retrieved 2015-10-01.