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

#2 Finding Duplicate Files

Duplicate files are a problem for me. I'll download pictures from my camera, forget I downloaded them, and download them again. I also get a lot of audio files from the Internet and many are duplicates of items I already have.[*] The result is that there's a lot of needless duplication on my system. So a script that locates duplicate files can be very useful when doing spring cleaning on a hard drive.

[*] Note to the MPAA: These are old radio shows from the '30s and '40s and the copyrights have long expired. So don't sue me.

The Code

 1 #!/usr/bin/perl 2 use strict; 3 use warnings; 4 use File::Find; 5 use Digest::MD5; 6 7 ########################################################### 8 # find_dups(@dir_list) -- Return ...
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