Find Examples

From trapsink.com
Jump to: navigation, search


find / -type f -name *.jpg  -exec cp {} . \;
find . -type f -size +10000 -exec ls -la {} \;
find . -atime +1 -type f -exec mv {} /tmp \;
find . -name "-F" -exec rm {} \;
find . -exec grep -i "admin" {} \;
find . \! -name "*.gz" -exec gzip {} \;
find . -type f \! -name "*.Z" \! -name ".comment" -print
find . -exec chmod 775 {} \;
find . -user user1 -exec chown -R user2 {} \;
find . -name 'cache*' -depth -exec rm {} \;
find . -name 'cache[0-9][0-9]*' -depth -print | tee -a /tmp/cachefiles
find . -xdev -name "wagoneer*" -print