bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange results executing the find command.


From: James Youngman
Subject: Re: Strange results executing the find command.
Date: Wed, 22 Dec 2004 11:19:37 +0000
User-agent: Mutt/1.3.28i

On Wed, Dec 22, 2004 at 08:38:45AM +0100, Andreas Metzler wrote:

> You are probably making a mistake. You are not protecting "*.php" from
> expansion by the shell, so if there exists a file named nav.php in the
> *current* directory and you type
> find reviews -name *.php
> your shell expands *.php and find gets to see
> find reviews -name nav.php
> 
> (Easily verifyable with echo find reviews -name *.php)
> 
> Use single-quotes to protect the wildcards from shell expansion:
> find reviews -name '*.php'

I'll try to remember over Christmas to check the documentation to be
sure that it does point out that this is often necessary, referring to
the shell documentation for more detailed explanation of what is
happening.

(Michel, did the documentation point this out?  I can't remember.)

James.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]