I can successfully run this command in the terminal:
find /home/www/files/1 -type f -name '*' -mtime +180 -exec rm {} \
However when I add it as a cron job like so:
*/5 * * * * find /home/www/files/1 -type f -name '*' -mtime +180 -exec rm {} \
It doesn't work and the system sends a mail saying find: missing argument to '-exec'
What can I do to make it work as a cron task?