scripting help

Sheldon Mustard smustard-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Thu Aug 2 19:27:57 UTC 2007


On 8/2/07, Neil Watson <tlug-neil-8agRmHhQ+n2CxnSzwYWP7Q at public.gmane.org> wrote:
> I want to check, in a script, for a file or files that are less than x
> number of days old.  If those conditions are met then do something.  I
> had something like this in mind:
>
> find ${TOMCAT}build/backup -iname "*war_????????-????" \
>     -mtime -$BACKUPAGE || echo "No files found!"
>
> However, I believe that if find encounters any errors, like permission
> denied, the exit value would change and the test would fail.
>
> Can someone suggest a better way?
>

I really like tmpreaper but not sure it fits this situation, I just
use it is blow stuff away not actually "do stuff".

SJM

-- 
Sheldon Mustard
smustard-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
"There will be no order, only chaos." - Pi (1998)
--
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list