Difference between revisions 507856 and 507857 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 <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>[[GNU_locate|locate]]</code> is not necessary or desirable. == Find syntax == {{expand-section|date=August 2008}} A single white space is needed to divide syntax elements when writing a find comm⏎ <code>'''find [-H] [-L] [-P] [path...] [expression]'''</code> Paths must precede expressions. 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. Otherwise, some usage error will come up..R (-o) as well as more complex predicates. The [[GNU]] find has a large number of additional features not specified in POSIX. == POSIX protection from infinite output == Real-world filesystems often contain looped structures created through the use of [[hard link|hard]] or [[symbolic link|soft links]]. The [[POSIX|POSIX standard]] requires that The find utility shall detect infinite loops; that is, entering a previously visited directory that is an ancestor of the last file encountered. When it detects an infinite loop, find shall write a diagnostic message to standard error and shall either recover (contracted; show full)[[fr:Find]] [[it:Find (Unix)]] [[hu:Find]] [[ja:Find]] [[pl:Find]] [[pt:Find]] [[ru:Find]] [[fi:Find (Unix)]] All content in the above text box is licensed under the Creative Commons Attribution-ShareAlike license Version 4 and was originally sourced from https://kn.wikipedia.org/w/index.php?diff=prev&oldid=507857.
![]() ![]() This site is not affiliated with or endorsed in any way by the Wikimedia Foundation or any of its affiliates. In fact, we fucking despise them.
|