Example 1 – Procurar arquivo
find . -maxdepth 1 -type f -cmin +1 -name “*.dmp” -exec ls -lh {} ;
find . -maxdepth 1 -type f -ctime +1 -name “*.dmp” -exec ls -rlth {} ;
Example 2- Apaga arquivos com mais de 5 dias de criado
find . -type f -ctime +5 -exec rm -f {} ;
Example 3 – Procura todos os arquivos com o nome “users.xml” e troca a string “pedrosa” pela “albuquerque”
find -name ‘pedrosa’ -o -name ‘users.xml’ -print0 | xargs -0 -P 1 -n 10 sed—in-place ‘s/pedrosa/albuquerque/g’
Example 4 – Case insensitive search using find in Unix
find . –iname “error” –print ( -i is for ignore )
#Deduplicacaofinde
find -not -empty -type f -printf “%sn” | sort -rn | uniq -d | xargs -I{} -n1 find -type f -size {}c -print0 | xargs -0 md5sum | sort | uniq -w32 –all-repeated=separate