this must be a very silly question, but after reading man find several times I haven't been able to figure out how to make it work...
I want to find the files in some folder that match some pattern and that were modified more than XX days ago, and
delete them .
What I'm using is:
Code:
find ~/sync/papers/ -name p*.* -mtime +5 -ls -exec rm{};
but I always get the error
find: missing argument to '-exec'
I've tried several approaches -rm{} [rm{}] {rm{}} (rm{}) --rm{} but the error persists
What am I doing wrong???
Is there any other way I can find and delete those files??
Thanks for the help!
PavoDive
