Perl Audit Reports

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I am new to perl . I need to write a perl script to generate an audit
report of a root directory and all subsequent sub-directories and
files under it, the report should be able to
1.  list any directories/files changes in size and content, addition,
deletion of any of them.
2.  It could be run for different location passing parameters.

the live example is:
we have all our pkgs installed on unix machine in some location ..
Here for eg., in /tmp if someone attempts to Insert/Update/Delete any
file(s) in any of the pkg/directory from this location we should get
an alert audit report.

Please help.

Re: Perl Audit Reports

On Tue, 01 Jul 2008 02:53:37 -0700, Kingmaker wrote:

Quoted text here. Click to load it

I use tripwire for this, there probably are others, but if you must do it
in Perl, simpel matter of programming.

Think how you want store the state. CSV seems to me a good format, but
you can also use a database like GDBM for instance. A DB is probably

Use File::Find to iterate over the directory structure and on first run
store the information, on subsequent runs report differences and possibly
store the new situation.

Use Getopt::Long to parse the command line.

Audi reports should probably be just printed to stdout, run your script
drom cron and let cron take care of mailing the result. But mailing from
Perl is also trivial, several modules can do this for you.

Start writing and when you get stuck, read the posting guidelines (yes
really, do that first!) and then ask for specific help with what you're
stuck with at that moment.


Site Timeline