Is it possible to execute two commands as part of a find command?
for ex:
find . -name "whatever" -mtime +1 -exec command1 {} destination -exec command2 {} ;
my intention is to find files satisfying the criteria, perform a command say copy the found files and then
perform a second command say removing the found files in one shot.
I know mv can be used instead of cp and then rm but those were just examples of two commands
thanks for any suggestions
for ex:
find . -name "whatever" -mtime +1 -exec command1 {} destination -exec command2 {} ;
my intention is to find files satisfying the criteria, perform a command say copy the found files and then
perform a second command say removing the found files in one shot.
I know mv can be used instead of cp and then rm but those were just examples of two commands
thanks for any suggestions