Mailinglist Archive: opensuse (2217 mails)

< Previous Next >
Re: [opensuse] find problem
  • From: Randall R Schulz <rschulz@xxxxxxxxx>
  • Date: Fri, 14 Sep 2007 10:28:10 -0700
  • Message-id: <200709141028.10538.rschulz@xxxxxxxxx>
On Friday 14 September 2007 10:22, Kenneth Schneider wrote:
> Can someone explain the following "find" error. The "path" is
> specified by the "." in the command line.
>
> find . -name *copy_3* -exec rm {}\;
>
> find: paths must precede expression

My guess would be that the current directory contains at least two files 
that match the glob pattern "*copy_3*".

In general, you should quote arguments that have the form of a glob or 
regular expression pattern (or any other special shell syntax):

find . -name '*copy_3*' -exec rm {} \;


Note, too, that the semicolon that tells find where the exec argument 
list ends must be a separate argument.


> --
> Ken Schneider


Randall Schulz
-- 
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups
References