scripting help

Neil Watson tlug-neil-8agRmHhQ+n2CxnSzwYWP7Q at public.gmane.org
Thu Aug 2 18:52:21 UTC 2007


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?

-- 
Neil Watson             | Debian Linux
System Administrator    | Uptime 25 days
http://watson-wilson.ca
--
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