DVD=$1 B=`/usr/sbin/mount | grep "$DVD on` if [ "$B" = "" ] then echo "DVD is not mounted. Please mount and then try again" exit fi nohup find /dvd/$DVD -type f -exec cksum {} \; >$CHECKDIR/cksum.$DVD.dvd & #### #!/usr01/aja96/perl/bin/perl use warnings; use strict; use Carp; use File::Find; use Digest::MD5 qw{ md5_hex }; use File::Slurp; my $dir = shift || '.'; my $debug = ''; my @cksums; sub wanted { my $file = $_; return if (-d $file); carp "cksumming $_ ($file)\n" if $debug; my $noodle = read_file( $file ) or croak "$file unreadable: $!\n"; my %file = ( name => $file, cksum => md5_hex( $noodle ), ); push @cksums, \%file; carp "$file checksummed\n" if $debug; } find( { wanted => \&wanted, follow_fast => 1 }, $dir ); print scalar @cksums, " checksums gleaned\n";