I like the *idea* of the locate command but find that the way it works by default is pretty useless.
When I say 'locate filexyz' I want to find a file (or maybe a directory) called filexyz, I don't want to see every file which has filexyz as part of its name, nor do I want to see every file in the hierarchy below a directory called filexyz.
Surely it would be more useful if the default was to do something similar to 'find' which will only find exact matches unless you specify otherwise. It would also be useful to be able to limit the search to a specified directory hierarchy but I don't think locate can do that at all (whereas find does it by default).
As locate works by default one almost inevitably gets about ten thousand lines of useless 'hits' which completely hide anything useful. It's only if you happen to want to find a really oddly named file (or directory) that you get a sane number of hits.
I know that one *can* make locate more selective but it's hardly intuitive to say:-
locate -b `\filexyz'
to get an exact match.
Sorry, this is just a rant really after having my screen once again filled up with thousands of unwanted/useless hits.
If anyone can offer a way of getting the same result as:-
find . -name filexyz
but with the speed of using locate's database then I'd live to hear of it. (OK, the find syntax is hardly user friendly but I'm more used to it)