From owner-freebsd-questions Sun Oct 13 07:24:17 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id HAA14890 for questions-outgoing; Sun, 13 Oct 1996 07:24:17 -0700 (PDT) Received: from onyx.interactive.net (root@onyx.interactive.net [208.192.224.6]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id HAA14879 for ; Sun, 13 Oct 1996 07:24:14 -0700 (PDT) Received: from localhost (host029.madison.interactive.net [208.192.224.129]) by onyx.interactive.net (8.7.5/8.7.3) with ESMTP id KAA27291; Sun, 13 Oct 1996 10:24:11 -0400 (EDT) Received: (sachs@localhost) by localhost (8.6.12/8.6.12) id KAA00424; Sun, 13 Oct 1996 10:27:21 -0400 Date: Sun, 13 Oct 1996 10:27:21 -0400 Message-Id: <199610131427.KAA00424@localhost> From: Jay Sachs To: hmmm@alaska.net Cc: questions@freebsd.org Subject: Re: find In-Reply-To: References: Reply-To: Jay Sachs Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk hmmm@alaska.net writes: >can anyone explain the difference between the 2 searches ? >many times it appears things act strangely different in different >directories for no apparent reason. > >cd usr/local/man/man1 >find / -name ispell* > >/usr/local/man/man1/ispell.1 >............................ The wildcard expansion of your shell turns this command into: find / -name ispell.1 because the file ispell.1 exists in /usr/local/man/man1 >cd usr/local/man >find / -name ispell* > >/dos/bsd/packages/all/ispell-3.1.2 >/usr/local/bin/ispell >/usr/local/man/man1/ispell.1 >/usr/local/man/cat1/ispell.1.gz >/usr/local/man/man4/ispell.4 >/usr/local/share/emacs/site-lisp/ispell.el >/usr/local/share/emacs/site-lisp/ispell.elc >/usr/packages/All/ispell-3.1.20.tgz >/var/db/pkg/ispell-3.1.20 In the second case, the ispell* dosn't get expanded, since no files match. So the command is find / -name ispell* (In other shells e.g. [t]csh, this would get expanded to find / -name and give an error) As others have pointed out, quoting *should* make the behavior the same. Try quoting with single quotes. (What shell are you using?) -jay