Look for distinct files under a directory matching a pattern

Hi,

I'm searching for a pattern 'java' under a directory but it is returning all the files containing 'java', but I want to have only distinct files not all.

please help

what option you have to make system understand "distinct". its all about search pattern which you pass.

Are you looking for files that contain 'java' or files called 'java' ?

If you are looking for a file that contains the string 'Java' is it preceeded or followed by a 'space' or a 'nl'

If you are trying to match 'java' and it comes back with 'java23' and/or 'javaxyx', both of those are a valid match.

if you are lookinf for a file name use 'find -name java'