bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Behaviour of locate with/without glob characters


From: James Youngman
Subject: Behaviour of locate with/without glob characters
Date: Wed, 3 Nov 2004 18:19:19 +0000
User-agent: Mutt/1.3.28i

Hello all,

I've been examining the functionality of "locate" in findutils and it
appears that its behaviour is as follows :-


1. If your pattern includes no glob characters ([?*) then all filenames 
   in the locatedb which include as a substring the text you specify 
   will be returned.   

2. If your pattern includes any glob characters, then only filenames
   in the locatedb which have a basename which matches the glob pattern
   will be returned.


Suppose the locatedb contains

/foo
/foo/bar
/foo/baz

"locate fo*" will return one result, "/foo".  On the other hand
"locate oo" will return all three entries, and "locate o/b" will
return two.


Is it supposed to work this way?
James.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]