In
computing
Computing is any goal-oriented activity requiring, benefiting from, or creating computer, computing machinery. It includes the study and experimentation of algorithmic processes, and the development of both computer hardware, hardware and softw ...
,
find
is a
command
Command may refer to:
Computing
* Command (computing), a statement in a computer language
* command (Unix), a Unix command
* COMMAND.COM, the default operating system shell and command-line interpreter for DOS
* Command key, a modifier key on A ...
in the
command-line interpreter
A command-line interface (CLI) is a means of interacting with software via commands each formatted as a line of text. Command-line interfaces emerged in the mid-1960s, on computer terminals, as an interactive and more user-friendly alternativ ...
s (
shells) of a number of
operating system
An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ...
s. 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 Standard may refer to:
Symbols
* Colours, standards and guidons, kinds of military signs
* Standard (emblem), a type of a large symbol or emblem used for identification
Norms, conventions or requirements
* Standard (metrology), an object t ...
device.
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 character
In software, a wildcard character is a kind of placeholder represented by a single character (computing), character, such as an asterisk (), which can be interpreted as a number of literal characters or an empty string. It is often used in file ...
s.
The command is available in
DOS
DOS (, ) is a family of disk-based operating systems for IBM PC compatible computers. The DOS family primarily consists of IBM PC DOS and a rebranded version, Microsoft's MS-DOS, both of which were introduced in 1981. Later compatible syste ...
,
Digital Research
Digital Research, Inc. (DR or DRI) was a privately held American software company created by Gary Kildall to market and develop his CP/M operating system and related 8-bit, 16-bit and 32-bit systems like MP/M, Concurrent DOS, FlexOS, Multiuser ...
FlexOS
FlexOS is a discontinued modular real-time multiuser multitasking operating system ( RTOS) designed for computer-integrated manufacturing, laboratory, retail and financial markets. Developed by Digital Research's Flexible Automation Business ...
,
IBM
International Business Machines Corporation (using the trademark IBM), nicknamed Big Blue, is an American Multinational corporation, multinational technology company headquartered in Armonk, New York, and present in over 175 countries. It is ...
/
Toshiba
is a Japanese multinational electronics company headquartered in Minato, Tokyo. Its diversified products and services include power, industrial and social infrastructure systems, elevators and escalators, electronic components, semiconductors ...
4690 OS
4690 Operating System (sometimes shortened to 4690 OS or 4690) is a specially designed point of sale (POS) operating system, originally sold by IBM. In 2012, IBM sold its retail business, including this product, to Toshiba, which assumed support. ...
, IBM
OS/2
OS/2 is a Proprietary software, proprietary computer operating system for x86 and PowerPC based personal computers. It was created and initially developed jointly by IBM and Microsoft, under the leadership of IBM software designer Ed Iacobucci, ...
,
Microsoft
Microsoft Corporation is an American multinational corporation and technology company, technology conglomerate headquartered in Redmond, Washington. Founded in 1975, the company became influential in the History of personal computers#The ear ...
Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
, and
ReactOS
ReactOS is a Free and open-source software, free and open-source operating system for i586/amd64 personal computers that is intended to be binary-code compatibility, binary-compatible with computer programs and device drivers developed for Wind ...
. On
MS-DOS
MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few op ...
, the command is available in versions 2 and later.
DR DOS 6.0[DR DOS 6.0 User Guide Optimisation and Configuration Tips](_blank)
/ref> and Datalight
Datalight was a privately held software company specializing in power failsafe and high performance software for preserving data integrity in embedded systems. The company was founded in 1983 by Roy Sherrill, and its headquarters is in Bothell, W ...
ROM-DOS
Datalight was a privately held software company specializing in power failsafe and high performance software for preserving data integrity in embedded systems. The company was founded in 1983 by Roy Sherrill, and its headquarters is in Bothell, ...
include an implementation of the command. The FreeDOS
FreeDOS (formerly PD-DOS) is a free software operating system for IBM PC compatible computers. It intends to provide a complete MS-DOS-compatible environment for running Legacy system, legacy software and supporting embedded systems. FreeDOS ca ...
version was developed by Jim Hall and is licensed under the GPL.
The Unix
Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
command find
performs an entirely different function, analogous to forfiles
on Windows. The rough equivalent to the Windows find
is the Unix grep
grep is a command-line utility for searching plaintext datasets for lines that match a regular expression. Its name comes from the ed command g/re/p (global regular expression search and print), which has the same effect. grep was originally de ...
.
Syntax
FIND V C N I"string" drive:path]filename ..
Arguments:
*"string"
This command-line argument
A command-line interface (CLI) is a means of interacting with software via command (computing), commands each formatted as a line of text. Command-line interfaces emerged in the mid-1960s, on computer terminals, as an interactive and more user ...
specifies the text string to find.
* rive: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)
In Unix-like operating systems, find is a command-line utility that locates files based on some user-specified criteria and either prints the pathname of each matched object or, if another action is requested, performs that action on each mat ...
, a Unix command that finds files by attribute, very different from Windows find
* grep
grep is a command-line utility for searching plaintext datasets for lines that match a regular expression. Its name comes from the ed command g/re/p (global regular expression search and print), which has the same effect. grep was originally de ...
, 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
A regular expression (shortened as regex or regexp), sometimes referred to as rational expression, is a sequence of characters that specifies a match pattern in text. Usually such patterns are used by string-searching algorithms for "find" ...
* List of DOS commands
This article lists notable commands provided by the MS-DOS disk operating system (DOS), especially as used on an IBM PC compatible computer. Other DOS variants as well as the legacy Windows shell, Command Prompt (cmd.exe), provide many of these c ...
References
Further reading
*
*
*
External links
Open source FIND implementation that comes with MS-DOS v2.0
{{Windows commands
External DOS commands
Microcomputer software
Microsoft free software
OS/2 commands
ReactOS commands
Pattern matching
Windows administration