On 1/4/2012 1:38 PM, Patrick O'Callaghan wrote:
They're quite different but overlap to some extent. 'find' is the reliable way of searching the current system according to a whole bunch of criteria (man find). 'locate' just does a quick search on a database which is updated regularly (usually nightly) by the updatedb program. The difference is that locate is very fast, but of course it only tells you what existed at the time the database was updated. You really need both programs at different times.
That clears up that one, thanks.
Nothing. 'locate' is just doing what it's defined to do (man locate). I gave a quick and dirty example of how to use it, without considering the case of directories named Makefile since they aren't that usual. You could modify my example to skip such directories but I doubt it's worth the effort unless this is something you're going to be doing frequently.
I was in a directory that had a Makefile, not a directory named makefile. But, given what I now know, I understand that its going to use the database and doesn't give a hoot about pwd or recursion. After reading your email, I re-read the man page and suddenly it makes sense. Embarressing to waste the list's time, I can only apologize for my brain fart.
Oh, and here is the bummer. It didn't work yesterday, but I am getting results closer to what you say I should today. I'm still not getting exactly what I should, but I am in the ballpark.
Your suggestion regarding xargs helped. This is the second time its been suggested to me and I am going to go off and read about it as I get a sense it will make my life alot easier.
-- users mailing list users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org