That works perfectly!! :D I had never thought of using -path and -f

Thank you very much for your kind help :)

Nick

Bowie Bailey wrote:
Nicholas Payne-Roberts wrote:
I think my problem is with the usage of the rm command. Even when i
execute it on its own (not within find) it fails to delete the file:

rm -f /home/vpopmail/domains/domain.com/nick/Maildir/.Junk
E-mail/cur/*
Executes with no error and fails to delete the contents of the
directory. Could this simply then be due to the fact that rm will not
delete files in a folder using * unless you are currently inside that
directory?

I think it is due to the space in the directory name.

What I would suggest is modifying the find command so that it finds
the individual files rather than the directory.  Try this:

find /home/vpopmail/domains -path "*/.Junk E-mail/cur/*" -type f -exec rm {}
\;

Reply via email to