[Tfug] When RTFM is not enough
Bowie J. Poag
tfug@tfug.org
Mon Jul 8 19:29:02 2002
On Monday 08 July 2002 02:05 pm, Brian Murphy wrote:
> On Mon, Jul 08, 2002 at 05:22:59AM -0700, Bowie J. Poag wrote:
> > > Ok, its shutup time. Every command has its place. Even though you
> > > don't know how to use it well, find makes some tasks easy. Suppose you
> > > want to make a report of all setuid root or setgid group 241 files?
> > > Don't tell me about /usr/local, because we know it was protected at the
> > > time. Also include the creation and last modification dates (M D Y) in
> > > your report.
> >
You've failed to address any of the points I just made, and dragging a red
herring into the argument is just plain sad, Bri. Read it over my original
response, and try again. If you can justify your argument, i'll be happy to
provide you the code to prove it.
Personally, I'd like to know how often you think a typical Unix user would
EVER need to do anything even REMOTELY like what you're describing. You know
as well as I do that the vast majority of people use "find" in a simplistic
fashion that wastes both time and system resources. We're talking about
general-purpose file search tools here. Not file search tools for use in
exceptional cases.
You, also, can pettifog the issue all you want..but until you provide a reason
why on earth you'de want to do this frequently, your example just underscores
what I said earlier. IN ALL BUT THE RAREST OF OCCASIONS, FIND IS NOT THE BEST
TOOL FOR THE JOB. Finding "atime & ctime for all files with uid root & gid
241 spec excluding /usr/local" is about as rare a case as I could imagine.
Find has its uses, namely for highly specific circumstances like the one
you're describing... But for day-to-day use, and for general-purpose
searching, find is miserably inefficient. For these tasks, find is not only
an enormous waste of time, its also an enormous waste of resources.
When you cant find the keys to your truck, Bri..... Do you wander around the
house systematically checking every square inch of your apartment with a
magnifying glass, top to bottom, EVERY TIME, or do you just perform a quick
check the areas of your apartment that you're most likely to have placed
them?
Obviously, you'll do the later of the two... Because the first method is a
complete waste of time and energy. So if its a waste of time and energy, why
the hell are you forcing your system to do the same thing?
So, lets recap:
o You tried to throw me off with a red herring, and failed.
o You tried to show that 'find' is a superior tool for general-purpose file
searches, and failed.
o You tried to dodge the numerous points I made and backed up with real-world
stats, and failed.
The only thing you've succeeded at is promoting a bad practice among the
novices. Parsing file information out of a periodically refreshed database
will _always_ be faster than trying to assemble the same information live,
Brian. Even you know that.
Bowie