online quarantine?
Spicer, Kevin
Kevin.Spicer at BMRB.CO.UK
Tue Aug 26 15:29:23 IST 2003
S Mohan wrote:
> Another alternative is
>
> find /path/to/quarantine -ctime +7 | xargs rm -rf
>
Yes, but that would delete directories that may have more recent contents. On the other hand my original line neglected to consider that there may be directories involved.
Thinking a bit more clearly than I was when I originally posted you probably also need a -depth in there, and append a /* to the path to avoid deleting the quarantine dir itself, plus some conditional stuff to get rid of directories. So...
find /path/to/quarantine/* -ctime +7 -depth \! \( -type d -exec rmdir {} ';' \) -exec rm -f {} ';'
This does rely on rmdir failing when the directory is not empty, so you'll also want to append
>/dev/null 2>&1
once its tested.
BMRB International
http://www.bmrb.co.uk
+44 (0)20 8566 5000
_________________________________________________________________
This message (and any attachment) is intended only for the
recipient and may contain confidential and/or privileged
material. If you have received this in error, please contact the
sender and delete this message immediately. Disclosure, copying
or other action taken in respect of this email or in
reliance on it is prohibited. BMRB International Limited
accepts no liability in relation to any personal emails, or
content of any email which does not directly relate to our
business.
More information about the MailScanner
mailing list