[vox-tech] Error Message From "find"

Karsten M. Self vox-tech@lists.lugod.org
Thu, 16 Jan 2003 23:06:59 +0000


on Thu, Jan 16, 2003 at 12:49:25PM -0800, Samuel Merritt (spam@andcheese.or=
g) wrote:
> On Thu, Jan 16, 2003 at 12:33:08PM -0800, Jim Angstadt wrote:
> > Hi All,
> >=20
> > Sometimes "find" will work; other times not.
> > Below is a script where "find" runs good, I cd to a
> > subordinate dir, run the same find command, and get an
> > error message.  This is repeatable on my Red Hat 7.2
> > system.

> > =1B]0;ja@localhost:~/public_html/web/pages/fam[ja@localhost
> > fam]$ cd public_html/web/pages/fam/[ja@localhost fam]$
> > find ~/public_html/web/pages/fam/ -name *.php -print |
> > wc -l
> > find: paths must precede expression
> > Usage: find [path...] [expression]
> >       0
>=20
> Here, your shell is expanding *.php to a list of all .php files in the
> current directory, so the command is actually
>=20
> find ~/public_html/web/pages/fam -name foo.php bar.php bert.php ...
> last.php -print
>=20
> You need to enclose *.php in double quotes so your shell will leave it
> alone.=20

=2E..or escape it:

   $ find . -name \*.php -print

Peace.

--=20
Karsten M. Self <kmself@ix.netcom.com>        http://kmself.home.netcom.com/
 What Part of "Gestalt" don't you understand?
   A guide to GNU/Linux browsers:
     http://kmself.home.netcom.com/Linux/FAQs/browsers.html