[plug] Find similarly named files in directories

Timothy White weirdit at gmail.com
Fri Jan 12 18:56:39 WST 2007


On 1/12/07, Lyndon Maydwell <maydwell at gmail.com> wrote:
> > What do you define as similar?
>
> Well, similar as in, have the same name :)
> Although matching within a tolerance would be much cooler.

So files with the same name, in the same folder? Which is going to
match a total of 0. I assume then you mean same name in multiple
folders...

For the reference, if your looking for absolute duplicates, then
fdupes is a good go.

Description: Identifies duplicate files within given directories
 FDupes uses md5sums and then a byte by byte comparison to find duplicate
 files within a set of directories. It has several useful options
 including recursion.

Otherwise I can think of a small bash script that would give you for
example, a list of same named files. And basically, you write a small
function that defines how to "reduce" the filename for your
comparison. So a simple "reducing" function would be to strip
extensions, and make it lower cased. Really, any "reducing" function
you can write, that takes ether a filename, or a complete path and
filename, and reduces it to a "hash" (as simple as you want it), I can
make into a bash script.

Let me know, and I'll have some fun coding before I leave. Otherwise,
have a look at fdupes.

Tim
p.s. If your ruby script does the job, use it, I will write mine in
bash, just because. :p
-- 
Linux Counter user #273956
Don't email joeblogs at scouts.org.au



More information about the plug mailing list