Date: Sun, 13 Oct 1996 10:27:21 -0400 From: Jay Sachs <sachs@luddite.org> To: hmmm@alaska.net Cc: questions@freebsd.org Subject: Re: find Message-ID: <199610131427.KAA00424@localhost> In-Reply-To: <Pine.BSF.3.95.961012165945.3430A-100000@hmmm> References: <Pine.BSF.3.95.961012165945.3430A-100000@hmmm>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610131427.KAA00424>