[K12OSN] Way OT: scripting help

Dan Young dyoung at mesd.k12.or.us
Thu May 24 16:33:59 UTC 2007


Dimitri Yioulos wrote:
> Hearty thanks to you, Dan, and Huck for your responses.  Looks like your 
> suggestions will work fine.  And thanks for the detailed explanation - very, 
> very helpful.
> 
> OK, now to perhaps earn your scorn and enmity by asking one last question (no, 
> really):  If I want to delete all files older than 1 day EXCEPT "somefile", 
> what might I do to:
> 
> find $WORKDIR -maxdepth 1 -mtime +$DAYSOLD -exec rm {} \;

find $WORKDIR -maxdepth 1 -mtime +$DAYSOLD ! -name somefile -exec rm \
{} \;

-- 
Dan Young <dyoung at mesd.k12.or.us>
Multnomah ESD - Technology Services
503-257-1562




More information about the K12OSN mailing list