From: Randal L. Schwartz on
>>>>> "Ben" == Ben Morrow <ben(a)morrow.me.uk> writes:

Ben> In my stat(2) (FreeBSD 7.3-RELEASE) I have

Ben> | st_birthtime Time when the inode was created.

Ben> It's possible this is just a FreeBSD thing, but I thought it was a
Ben> 4.4-ism.

Definitely not in the One True Unix, therefore, not portable.

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn(a)stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
From: John Bokma on
GRP <rengaprasath(a)gmail.com> writes:

> hi,
>
> I would like to write a script to grep some pattern in few set of log
> files and alert it...
>
> In order to avoid duplicate alert i plan to store the "FILENAME:ERR-
> LINE-NUMBER:FILE-CREATION-TIME" in a flat file (colon delimiter) , so
> that next time if the same pattern found in same line it will check
> against the flat file and won't alert. At the same time if it happens
> in different line number it wud check in flat file & the 2nd filed
> would be different so it will alert.

It might help if you describe when a clash can occur, i.e. why do you
need the inode creation time, and why is filename:err-line-no not unique
(I can think of reasons, but want to know the ones in your situation.)

--
John Bokma j3b

Hacking & Hiking in Mexico - http://johnbokma.com/
http://castleamber.com/ - Perl & Python Development
From: Dr.Ruud on
GRP wrote:

> I would like to write a script to grep some pattern in few set of log
> files and alert it...
>
> In order to avoid duplicate alert i plan to store the "FILENAME:ERR-
> LINE-NUMBER:FILE-CREATION-TIME" in a flat file (colon delimiter) , so
> that next time if the same pattern found in same line it will check
> against the flat file and won't alert. At the same time if it happens
> in different line number it wud check in flat file & the 2nd filed
> would be different so it will alert.
>
> Since i can't find a way to get ctime in unix (i tried with perl as
> well), would be there any other way to achieve this or better logic?

You can use git.

--
Ruud