Skip to Main Content
Wicked Cool Perl Scripts
book

Wicked Cool Perl Scripts

by Steve Oualline
February 2006
Intermediate to advanced content levelIntermediate to advanced
304 pages
6h 16m
English
No Starch Press
Content preview from Wicked Cool Perl Scripts

#3 Checking for Changed Files

Sometimes it's useful to figure what files have changed on your system. For example, you might want to know what a software upgrade actually touched. Other times you want to make sure that files on your system don't change. For example, system-critical configuration files or commands should remain intact. Changes in these files can indicate that your system has been hacked.

This script checks a filesystem and reports any changes made since the last time it was run.

The Code

 1 use strict; 2 use warnings; 3 use File::Find; 4 use Digest::MD5; 5 use Storable qw(nstore retrieve); 6 7 # File in which to store the change information 8 my $info_file_name = ".change.info"; 9 10 ######################################################## ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Perl Debugged

Perl Debugged

Peter Scott, Ed Wright
Perl & LWP

Perl & LWP

Sean M. Burke
Pro Perl

Pro Perl

Peter Wainwright

Publisher Resources

ISBN: 1593270623Catalog PageErrata