getting rid of duplicate files

i have a bad problem with multiple occurances of the same file in
different directories.. how this happened i am not sure! but I know
that i can use awk to scan multiple directory trees to find an
occurance of the same file... some of these files differ somwhat
but that does not matter! the name of the files are the same and
the context is basically the same....
i have seen an awk script that can be run on the command line using
a syntax where var=file:r and dup=var++ and var < 1 or to the
extent of this but can not remember exactly how this works.......
using the C shell;
i need to find occurances of var and if they are greater than one
and remove them leaving one occurance .. .
any examples or clues as to how to piece this together would be
appreciated since i don't use awk that often.
moxxx68

Start with something like this to find actual duplicated names.
Then use the file to find the paths to get full file names.

find /path -print -exec basename {} \; | awk 'arr[$0]++' > file

thanx,
will try!
moxxx68.......

too many occurances to rm manually!
will this work...

find ./path -iname "basename" | awk 'BEGIN{arr[$0]++}{var=[$0];var > 0; var++}END{i=[var++]}' | xargs mv --target-directory=dup-dir

%rm dup-dir

looks like it would work if i could use an array to parse the
occurances starting with occurance 1 instead of 0... obviously
this could be in any directory but the way the tree is configured
it doesn't really matter as long as i have one occurance left!

could please use some help...
moxxx68

find ./path -print -exec basename {} \; | awk -v var=arr 'arr[$0]++;i >= 2; i$var' | xargs mv --target-directory=test..

this worked to a certain extent although I am getting some error
messages with the cp command and the basename is contingious to
all names of the same type (ex, file.txt-{1,2,3,4}) and I am not
sure if this gives the exact result as far as leaving one file
although i tried diff two test directories against each other it
seemed real close.. please leave affirmation of any correct syntax
used (if any?)..
moxxx68