[CentOS] recursively find duplicate filenames

Wed Jan 5 17:46:08 UTC 2011
m.roth at 5-cent.us <m.roth at 5-cent.us>

S Mathias wrote:
> "duplicate filenames"
>
> -> duplicate filenames
>
Please don't top post.

Now, a) you can't have identical filenames in the same directory, so shall
I assume that you're looking for all files under one heirarchical
directory structure that have the same name? If so,

find $1 -name $2 -ls

would give you all files of the same name. If, instead, you only needed to
know how many of each, you could
find $1 -name $2 | wc -l

        mark
> --- On Wed, 1/5/11, Dominik Zyla <gavroche at gavroche.pl> wrote:
>
>> From: Dominik Zyla <gavroche at gavroche.pl>
>> Subject: Re: [CentOS] recursively find duplicate filenames
>> To: centos at centos.org
>> Date: Wednesday, January 5, 2011, 1:11 PM
>> On Wed, Jan 05, 2011 at 03:15:03AM
>> -0800, S Mathias wrote:
>> > find duplicate filenames in a folder
>> > find | perl -ne 's!([^/]+)$!lc $1!e; print if 1 ==
>> $seen{$_}++'
>> >
>> > find duplicate filenames in a folder recursively
>> > ? how?
>>
>> What do you mean - duplicate? Duplicate by what? Name?
>> Content?
>>
>> --
>> Dominik Zyla
>>
>>
>> -----Inline Attachment Follows-----
>>
>> _______________________________________________
>> CentOS mailing list
>> CentOS at centos.org
>> http://lists.centos.org/mailman/listinfo/centos
>>
>
>
>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>