Difference between revisions 507975 and 507976 on knwiki

{{other uses}}
{{lowercase|title=find}} 
In [[Unix-like]] and some other [[operating system]]s, <code>'''find'''</code> is a [[command-line utility]] that [[Search engine (computing)|searches]] through one or more [[directory tree]]s of a [[file system]], locates [[Computer file|file]]s based on some [[user (computing)|user]]-specified criteria and applies a user-specified action on each matched file. The possible search criteria include a [[pattern matching|pattern(contracted; show full)
===Search for all files owned by a user===
 find . -user <userid>

===Search in case insensitive mode===
 find . -iname "MyFile*"


-iname, not to be confused with -inum( find based on inode value)

 find . -inum 1407374883783078

If the <code>-iname</code> switch is not supported on your system then workaround techniques may be possible such as:

 find . -name "[mM][yY][fF][iI][lL][eE]*"

This uses [[Perl]] to build the above command for you:

 echo "'MyFile*'" |perl -pe 's/([a-zA-Z])/[\L\1\U\1]/g;s/(.*)/find . -name \1/'|sh

(contracted; show full)[[hu:Find]]
[[ja:Find]]
[[pl:Find]]
[[pt:Find]]
[[ro:Find]]
[[ru:Find]]
[[fi:Find (Unix)]]
[[uk:Find]]