find and copy

find . -name "FILE-TO-FIND"-exec rm -rf {} ;
find . -type f -name "FILE-TO-FIND" -exec rm -f {} ;
$ find . -type f -name "*.bak" -exec rm -f {} ;
# find / -name core -exec rm -f {} ;
$ find . -type f -name "*.bak" -exec rm -i {} ;

pay attention the dot after find command. you can change it to some location,
find /media/disk -name "*.bak" -exec rm -f {} ;

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.