Difference between revisions 507881 and 507882 on knwiki

{{otheruses}}
{{lowercase|title=find}} 
The <code>'''find'''</code> program is a [[directory (file systems)|directory]] [[Search engine (computing)|search utility]] on [[Unix-like]] platforms. It searches through one or more directory [[tree (computing)|trees]] of a [[filesystem]], locating [[Computer file|file]]s based on some user-specified criteria. By default, <code>find</code> returns all files below the current [[working directory]]. Further, <code>find</code> allows the user to specify an action to be taken on each matched file. Thus, it is an extremely powerful program for applying actions to many files. It also supports [[Regular expression|regex]] matching.

The related, <code>'''[[GNU locate|locate]]'''</code> programs, use a database of indexed files obtained through <code>find</code> (updated at regular intervals, typically by <code>'''[[cron]]'''</code> job) to provide a faster method of searching the entire filesystem for files by name.  This sacrifices overall efficiency (because filesystems are regularly interrogated even when no users needs information)and absolute accuracy (since the database is not updated in real time) for significant speed improvements (particularly on very large filesystems).  On fast systems with small drives, <code>locate</code> is not necessary or desirable.

HI
{{expand-section|date=August 2008}}

<code>'''find [-H] [-L] [-P] [path...] [expression]'''</code>

The three options control how the find command should treat symbolic links. The default behaviour is to never follow symbolic links. This can be explicitly specified using the -P flag. The -L flag will cause the find command to follow symbolic links. The -H flag will only follow symbolic links while processing the command line arguments.

At least one path must precede the expression.  Find is capable of interpreting [[Wildcard character|wildcards]] internally and commands must be constructed carefully in order to control [[Glob (programming)|shell globbing]].

Expression elements are whitespace-separated and evaluated from left to right.  They can contain logical elements such as AND (-a) and OR (-o) as well as more complex predicates.

The [[GNU findutils|GNU]] find has a large number of additional features not specified by POSIX.

hi

==Examples==

===From current directory===
 find . -name 'my*'
This searches in the current directory (represented by a period) and below it, for files and directories with names starting with ''my''. The quotes avoid the [[shell (computing)|shell]] expansion - without them the shell would replace ''my*'' with the list of files whose names begin with ''my'' in the current directory. In newer versions of the program, the directory may be o(contracted; show full)[[it:Find (Unix)]]
[[hu:Find]]
[[ja:Find]]
[[pl:Find]]
[[pt:Find]]
[[ru:Find]]
[[fi:Find (Unix)]]
wikipedia is a great place to find information. Is a sentence that has find in it find can be used in so many different ways