Difference between revisions 507871 and 507872 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, <c(contracted; show full) find . -name "*.xml" -exec grep "ERROR" '{}' \; -print The double quotes (" ") surrounding the search string and single quotes (<nowiki>' '</nowiki>) surrounding the braces are optional in this example, but needed to allow spaces and other special characters in the string. ===Search for all files owned by a user=== find . -user <userid> ===Search in case insensitive mode=== find . -iname <filename> -type f -print ===Search files by size=== Example of searching files with size between 100 kilobytes and 500 kilobytes. find . -size +100k -a -size -500k The units should be one of [bckw], 'b' means 512-byte blocks, 'c' means byte, 'k' means kilobytes and 'w' means 2-byte words. The size does not count indirect blocks, but it does count blocks in sparse files that are not actually allocated. ⏎ ⏎ ==See also== *[[GNU locate]], a Unix search tool based on a prebuilt database therefore faster and less accurate than find *[[mdfind]], a similar utility that utilizes metadata for [[Mac OS X]] and [[Darwin (operating system)|Darwin]] *[[List of Unix programs]] *[[List of DOS commands]] *[[find (command)]], a DOS and Windows command that is very different from UNIX find ==External links== *[http://www.gnu.org/software/findutils/ GNU Findutils] - Comes with the [[xargs]] and [[GNU locate|locate]] commands. *[http://www.gnu.org/software/findutils/manual/html_mono/find.html Official webpage for GNU find] *[http://www.softpanorama.org/Tools/Find/find_mini_tutorial.shtml Softpanorama find tutorial] *{{man|1|find||search for files in a directory hierarchy}} *[http://www.enciclopedia.galeon.com/find.html Exercises "Find"] *[http://find.unixpin.com/ "Find helper" - unix "find" wizard] *[http://www.oracle.com/technology/pub/articles/calish-find.html Guide to Linux Find Command Mastery] *[http://www.shell-fu.org/lister.php?tag=find Top 'find' commands - interesting usage] {{Unix commands}} [[Category:Unix software]] [[Category:Searching]] [[de:Find]] [[el:Find]] [[es:Find]] [[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=507872.
![]() ![]() 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.
|