Difference between revisions 507894 and 507895 on knwiki

{{otheruses}}
{{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)
 echo "'MyFile*'" |perl -pe 's/([a-zA-Z])/[\L\1\U\1]/g;s/(.*)/find . -name \1/'|sh

===Search files by size===
Example of searching files with size between 100 kilobytes and 500 kilobytes.
 find . -size +100k -a -size -500k



===Search files by name and size ===
for file in `find /opt \( -name error_log -o -name 'access_log' -o -name 'ssl_engine_log' -o -name 'rewrite_log' -o -name 'catalina.out' \) -size +300000k -a -size -5000000k`; do cat /dev/null > $file; done 




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
(contracted; show full)[[fr:Find]]
[[it:Find (Unix)]]
[[hu:Find]]
[[ja:Find]]
[[pl:Find]]
[[pt:Find]]
[[ru:Find]]
[[fi:Find (Unix)]]