Mailinglist Archive: opensuse (4547 mails)

< Previous Next >
Re: [SLE] Is there a "find file on system" command?
  • From: Robert Paulsen <robert@xxxxxxxxxxxxxxxxx>
  • Date: Mon, 17 May 2004 21:27:01 -0500
  • Message-id: <200405172127.01269.robert@xxxxxxxxxxxxxxxxx>
Minor correction ...

On Monday 17 May 2004 21:22, Robert Paulsen wrote:
> On Monday 17 May 2004 19:35, James Knott wrote:
> > Robert Paulsen wrote:
> > > On Monday 17 May 2004 03:43, Jerome Lyles wrote:
> > >>Password:
> > >> # find / -name *.rpm
> > >>find: paths must precede expression
> > >>Usage: find [path...] [expression]
> > >> #
> > >>
> > >>What happened? Isn't '/' enough path for this command?
> > >>Thanks,
> > >>Jerome
> > >
> > > You need to put quotes around the expression you are looking for if it
> > > contains special characters that the shell will act on (in your case
> > > the *). Try this...
> > >
> > > find / -name "*.rpm"
> > >
> > > You want the find command to see the *, not the shell.
> >
> > It works fine for me without the quotes. However, this is on Red Hat
> > 7.3.
>
> If there are no *.rpm files in the current directory then it will work w/o
> the quotes. Try the following:

Should have said "in the directory where the find starts looking. That's / in
the above and . in the following example.
>
> touch xxx.rpm
> find . -name *.rpm
> find . -name "*.rpm"
>
> Assuming there are some rpm files to find in subdirectories you should see
> the difference.
> --
> Robert C. Paulsen, Jr.
> robert@xxxxxxxxxxxxxxxxx

--
Robert C. Paulsen, Jr.
robert@xxxxxxxxxxxxxxxxx

< Previous Next >
Follow Ups