Difference between revisions 507795 and 507796 on knwiki{{See Wiktionary|a computer utility}} {{lowercase|title=find}} {{For|the EP by Hidden in Plain View|Find (EP)}} The <code>'''find'''</code> program is a [[directory (file systems)|directory]] [[search utility]], mostly found on [[Unix-like]] platforms. It searches through one or more directory [[tree (computing)|tree(s)]] 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. ==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 omitted, and it will imply the current directory. ===Files only=== find . -name "my*" -type f This limits the results of the above search to only regular files, therefore excluding directories, special files, pipes, symbolic links, etc. ''my*'' is enclosed in quotes as otherwise the shell would replace it with the list of files in the current directory starting with ''my''... ===Commands=== (contracted; show full)[[Category:Searching]] [[de:Find]] [[es:Find]] [[ja:find]] [[pl:Find]] [[pt:Find]] [[ru:Find]] 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=507796.
![]() ![]() 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.
|