in reply to -e stransgeosities
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: -e stransgeosities
by misterperl (Pilgrim) on Apr 23, 2012 at 13:44 UTC | |
by Corion (Patriarch) on Apr 23, 2012 at 13:49 UTC | |
by Jenda (Abbot) on Apr 23, 2012 at 23:33 UTC |
In Section
Seekers of Perl Wisdom