Find with rm command gives strange results

I want to remove any files that are older than 2 days from a directory. It deletes those files. Then it comes back with a message it is a directory. What am I doing wrong here?

+ find /mydir -mtime +2 -exec rm -f '{}' ';'
rm: /mydir is a directory

man rm
This is the default behaviour of rm..

You can add -type f to the find command so that it only finds files..

Do you tmpwatch available? That can help you tidy files away too.

You don't tell us your OS variant, so it may not be installed.

I hope that this helps,
Robin