[ale] file modification time via shell script

Greg Freemyer greg.freemyer at gmail.com
Fri Aug 3 15:43:54 EDT 2007


On 8/3/07, Jim Popovitch <yahoo at jimpop.com> wrote:
> I'v got an electronic voting machine that I need some help hacking on..
> NOT!  (but I did get your attention...)  ;-)
>
> Here's what I am trying to do however:  I need to run a script (via
> cron) that first determines if a log file changed since the last time
> the script ran before it does further processing.  Ideas?
>

>From the top of my head,  (ie. no testing even of syntax)

WORK=`find <logfile> -newer /usr/local/share/my-flag-file -print`

touch /usr/local/share/my-flag-file

if [ $WORK == "" ]
    exit

real work


Greg
-- 
Greg Freemyer
The Norcross Group
Forensics for the 21st Century



More information about the Ale mailing list