Page is a not externally linkable
- Hardware and OS Related Technologies
-- Linux, Unix, and *nix like Operating Systems
---- Linux locate bug


joecarter - 5:44 pm on Mar 16, 2010 (gmt 0)


I am new to Linux and am running a Centos 5 distribution to get up to speed. One thing which I have found extremely frustrating on the first day is the inconsistencies with a simple command like "locate". See the commands below with OK! for success and FAILED! for the inconsistency ... :

[root@localhost /]# locate "*mware-config*.pl"
/usr/bin/vmware-config-tools.pl
OK !
[root@localhost /]# locate "*mware-config*"
/usr/bin/vmware-config-tools.pl
OK !
[root@localhost /]# locate "*mware-config-tool*.pl"
/usr/bin/vmware-config-tools.pl
OK !

[root@localhost /]# locate "vmware*.pl"
FAILS!
[root@localhost /]# locate "vmware*"
FAILS!
[root@localhost /]# locate "vmware-config*.pl"
FAILS!
[root@localhost /]# locate "vmware-config-*.pl"
FAILS!


This is UTTERLY INCONSISTENT! Why does the trailing * wildcard not deliver the file ? Much appreciated if anyone can assist :-)


Thread source:: http://www.webmasterworld.com/linux/4098931.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com