[ALUG] Re: 'locate' isn't always helpful, how to do better?

Eur Ing Chris Green cl at isbd.net
Thu Feb 22 11:28:41 GMT 2007


On Thu, Feb 22, 2007 at 11:09:16AM +0000, Paul wrote:
> 
> Hi Chris
> 
> On Thursday 22 February 2007 10:50, Eur Ing Chris Green wrote:
> > While the 'locate' command is very useful at times, especially if you
> > have lost a specific file it's much less useful when looking for, for
> > example, a directory which has a rather common name.
> 
> My first reaction was use `find`, but....
> 
> > I know I can use an RE in locate but it's not all *that* simple to
> > come up with an RE to do it.
> 
> A quick look at `man locate` shows that it provides many of the same options 
> as find. If it is a directory you seek, use `-type d`, and to limit the depth 
> of search, add `-maxdepth 3` - None of which involve gnarly regexs ;)
> 
Not on my locate!  There's no options anything like -type or
-maxdepth.

My locate is:-
    home$ locate -V
    Secure Locate 3.1 - Released March 7, 2006

What's yours?

-- 
Chris Green



More information about the main mailing list