[opensuse] find problem
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 -- Ken Schneider UNIX since 1989, linux since 1994, SuSE since 1998 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [opensuse] find problem
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 [EMAIL PROTECTED] Novell, Inc. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [opensuse] find problem
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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [opensuse] find problem
Quoting Kenneth Schneider [EMAIL PROTECTED]: Can someone explain the following find error. The path is specified by the . in the command line. find . -name *copy_3* -exec rm {}\; Try: find . -name *copy_3* -exec rm \{} \; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]