in reply to win32::ChangeNotify replacement for Unix?

Essentially what you want to do is quite similar to basic intrusion monitoring. While you could easily configure tripwire to do this that would be total overkill. What you probably want is a basic IDS like Fcheck which is in perl so you can hack the good bits out.

If you are just monitoring a single dir you could just have a quick script that runs under cron. Make it silent for no changes and run it under your cron tab and it will email you with every change.

[root@devel3 root]# cat test.pl #!/usr/bin/perl my $dat = '/tmp/dat'; my $dir = '/root/'; if ( -e $dat ) { `ls -al $dir > $dat.current`; if ( `cat $dat` eq `cat $dat.current` ) { print "Dir $dir probably unchanged!\n"; } else { print "Dir $dir has changed\n", `diff -b $dat $dat.current`; `cat $dat.current > $dat`; } } else { `ls -al $dir > $dat`; # first pass init } [root@devel3 root]# ./test.pl # init stage [root@devel3 root]# ./test.pl Dir /root/ probably unchanged! [root@devel3 root]# touch foo [root@devel3 root]# ./test.pl Dir /root/ has changed 22a22 > -rw-r--r-- 1 root root 0 Feb 17 20:57 foo [root@devel3 root]# touch test.pl [root@devel3 root]# ./test.pl Dir /root/ has changed 56c56 < -rwxr-xr-x 1 root root 385 Feb 17 20:57 test.pl --- > -rwxr-xr-x 1 root root 385 Feb 17 20:58 test.pl [root@devel3 root]#

If you just wanted a list of filenames that has changed then just use ls. With ls -al it will pick changes to perms, ownership and M time of existing files as well as deletions/additions.

cheers

tachyon