locate command doubt !!!

Hello,
I want to search for a file/directory named "abc" which is located anywhere in the given unix system.
I am using the command :-

But the problem is that this is giving me all combinations of files with have 'abc' in their name. But can I know the option to be used to get the location where only "abc" is present.Can u please help me !!!

You should use the find command. man find(1).

You can write it using meta character patterns and also regular expressions with -r. So just check

man locate

and play around a bit.

Edit: Or as fpmurphy says :wink:

hello sir,
I know abt the "find" command.But it can be used to search only in the current directory. But my requirement asks me "anywhere in the given system".

So I need to use LOCATE command.Now can you please tell me how to get a unique search........

Hi

U can use the Find command which has more options compared to that of the Locate command.

In addtion to this u can also use the grep command to specifically search the word "abc"

If it is there, this should find it within the filesystem called "given_system".

find /"given_system"/ -name "abc" -follow -print