VVDQ : pine??

Derick Centeno aguilarojo at verizon.net
Tue Dec 21 10:00:21 MST 2004


As always mascarasnake you are cogent, concise and inspirational with
your explanations.  I'm keeping your explanation as part of my permanent
record of command reference resources which are usually more helpful to
me than the man pages are.  I'm glad you are present here and the YDL
FAQ website!  Your use of pipes is very instructive.

How about this proposal...I'll write up for the YDL FAQ site a detailed
concept of what I had in mind comparing the find, and locate commands
and you rewrite this or something more detailed for the YDL FAQ pages
and we'll link these articles to one another as cross-references!

On Sun, 2004-12-19 at 11:32, mascarasnake wrote:
> Hey Derick -
> 
>  From what I've been able to glean, 'locate' will find files matching 
> the search criteria by looking into a file created by 'updatedb' while 
> 'find' is an interactive search process.
> 
> 'updatedb' runs as a daily con job (I think - it is on both of my linux 
> boxes-but I can't remember if that was stock, or if I modified that) and 
> produces a text file that would be similar to:
> 	ls -R / > file.log
> (don't ask me the actual file - I ain't lookin' it up right now).
> 
> 'find' is actually interactive with the system and can be used in 
> scripts kinda like this nifty rename script I found and modified a bit:
> 	find <directory>/ -iname "<pattern1>" -exec echo "mv '{}' '{}'" \; | 
> sed 's/<pattern1>/<pattern2>/2' | /bin/sh
> 
> So basically 'locate' looks in a text file and is a kinda glorified:
> 	ls -R / > logfile; cat logfile | grep <searchquery>
> except it will give you full pathnames. Since it relies on the file 
> created by 'updatedb', it won't find a file created since the last 
> 'updatedb'
> 
> 'find' works interactively with the system and can find the file you 
> just created. It can also be piped to other commands/scripts a lot 
> easier than 'locate'.
> 
> That's the simple explain - the man pages actually give more in depth 
> tags and all that good stuff
> 
> 
> Derick Centeno wrote:
> 
> > I'm tempted to get into an analysis of what locate does versus what find
> > does. 



More information about the yellowdog-general mailing list