On Sun, Nov 28, 2010 at 6:14 PM, John Jason Jordan <joh...@comcast.net> wrote: > On Sun, 28 Nov 2010 16:47:54 -0800 > Marvin Kosmal <mkos...@gmail.com> dijo: > >>Locate uses a database to answer the question.. >> >>Find does a search to answer the question.. >>Find is also A LOT move flexible.. Takes more options > > Thanks for all the replies. Now I understand. And from now on I'll just > use find.
If you need to find things often, you're probably better served by running updatedb more frequently. I often 'sudo updatedb', grab a coffee, and come back to run locate. (well, I do this less often than I drink coffee :). For me, updatedb is a 5-10 min operation. Find will do roughly the same thing, but find's results aren't as easily reusable (unless you're really thinking ahead, and really know find). It can be difficult to get the find invocation just right, and you often don't notice until it's spammed your screen with errors (hence the 2>/dev/null that someone suggested). This isn't to say that find isn't useful -- but when searching an entire system for something by name, I find locate to be generally better, even with the delay to run updatedb. If you *aren't* searching the full system, then I either use find (usually), or pipe locate through grep, searching for the path I'm interested in. --Rogan _______________________________________________ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug