find (command)

From Infogalactic: the planetary knowledge core
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.

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.

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 to search.

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.

Example

find "keyword" < inputfilename > outputfilename

See also

References

<templatestyles src="Reflist/styles.css" />

Cite error: Invalid <references> tag; parameter "group" is allowed only.

Use <references />, or <references group="..." />

<templatestyles src="Asbox/styles.css"></templatestyles>

<templatestyles src="Asbox/styles.css"></templatestyles>

  1. Lua error in package.lua at line 80: module 'strict' not found.
  2. http://technet.microsoft.com/en-us/library/bb490906.aspx Microsoft TechNet Find article
  3. Lua error in package.lua at line 80: module 'strict' not found.
  4. Lua error in package.lua at line 80: module 'strict' not found.