[K12OSN] find command

Jim McQuillan jam at mcquil.com
Wed Aug 29 14:12:42 UTC 2007



Roger wrote:
> On 8/29/07, Nils Breunese <nils at breun.nl> wrote:
>> Roger wrote:
>>
>>> you answered exactly why I use find.    I  never would have come up
>>> with that wording, but you put exactly why I use find instead of
>>> locate.  Locate is to locate a file,  or to see where I squirreled
>>> something away.  I use find when I want to get certain files in a
>>> subdirectory and do something with them.
>>> I just recently noticed that find uses the wild card character like
>>> you expect it to, I was just wondering when it changed.
>> I couldn't find that change in the output of 'rpm -q --changelog
>> findutils', but I guess it has been this way for quite some time now.
>> At least I don't remember having to escape wildcards when using find.
> 
> 
> 
> I first learned it on solaris, then used it on BSD.  Could be linux version
> you never had to.  And to think I could have saved a keystroke all these
> years..
> 


It's NOT the find command that you have to escape wildcards (Shell 
metachars) from.

It's the shell.

The shell processes the command line, expanding metacharacters before 
passing the result on to the find command.  Find never gets a chance to 
see the metachars, unless, of course, you escape them from the shell 
with something like \* or single quotes '*'.

Jim McQuillan
jam at Ltsp.org




More information about the K12OSN mailing list