On Fri, May 16, 2014 at 03:13:51PM +0100, Laurie Brown wrote:
On 16/05/14 14:57, Chris Green wrote:
Does anyone else find that 'locate' does all the wrong things for them? It's not that it's incapable of doing what I want but the defaults seem to be set up to be purposely the opposite of what I actually need it to do.
Have you tried "whereis"?
The whereis utility checks the standard binary, manual page, and source directories for the specified programs, printing out the paths of any it finds.
Yes, I know about 'whereis', useful sometimes (though 'man -k' is more often what I'm after on that front).
It's no good for finding that letter I wrote last year, or the laserjet 1320 PDF manual I know I saved somewhere (it was trying to find the 1320 manual that brought on this rant!).
Also, locate uses a database IIRC, which on my Gentoo systems is maintained nightly (cron) by a tool called updatedb. Consequently it's very fast.
Exactly! What I want is a 'find' that uses a database like 'locate'. For me 'find' is perfect in what it does and how it allows me to tune the search but it's too slow if one is searching across a big disk.