Mailinglist Archive: opensuse (2217 mails)

< Previous Next >
Re: [opensuse] find problem
  • From: JP Rosevear <jpr@xxxxxxxxxx>
  • Date: Fri, 14 Sep 2007 13:27:23 -0400
  • Message-id: <1189790843.7206.52.camel@xxxxxxxxxxxxxxxxxxx>

On Fri, 2007-09-14 at 13:22 -0400, 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


It means you have something in . that matches *copy_3* so you get file
expansion.

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

or 

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

-JP
-- 
JP Rosevear <jpr@xxxxxxxxxx>
Novell, Inc.

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

< Previous Next >
References