There's more than one way to do things | |
PerlMonks |
Re: -e stransgeositiesby pvaldes (Chaplain) |
on Apr 20, 2012 at 15:42 UTC ( [id://966212]=note: print w/replies, xml ) | Need Help?? |
I was attempting to see if the same file existed in two directories. So I set up... No, this is not the way. Two files can have the same name in different directories and have very different contents. The same file can be saved also with a different name. You could install and use fdupes print `fdupes -S /path/to/myfirstdir/ /path/to/myotherdir/`;Or read this node: Find duplicate files. The idea is to compute the md5sum of your target and look for a file with the same md5sum, i.e. with the Digest::md5 module.
In Section
Seekers of Perl Wisdom
|
|