Difference between revisions 507770 and 507771 on knwiki

{{lowercase|title=find}} 
:''For the EP by Hidden in Plain View, see [[Find (EP)]]''

The <code>'''find'''</code> program is a [[search utility]], mostly found on [[Unix-like]] platforms. It searches through one or more [[directory (file systems)|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(contracted; show full)

===Specify a directory===
 find /home/brian -name "myfile" -type f -print
This searches for files named ''myfile'' in the ''/home/brian'' directory, which is the home directory for the user ''brian''.  You should always specify the directory to the deepest level you can remember.

===Search several directories===
 find local /tmp -name mydir -type d -print
This searches for directories named ''mydir'' in the 
"''local"'' subdirectory of the current working directory and the ''/tmp'' directory.

===Ignore errors===
If you're doing this as a user other than root, you might want to ignore permission denied (and any other) errors with this:
 find / -name "myfile" -type f -print 2>/dev/null

===Find any one of differently named files===
 find . ( -name "*jsp" -or -name "*java" ) -type f -ls
(contracted; show full)
{{unix commands}}

[[Category:Unix software]]
[[Category:Searching]]

[[de:Find]]
[[pl:Find]]