delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/03/15/18:45:36

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Thu, 15 Mar 2001 18:19:06 -0500 (EST)
From: Derek Pomery <dpomery AT cuc DOT edu>
X-Sender: dpomery AT atlas DOT cs DOT cuc DOT edu
To: cygwin AT cygwin DOT com
Subject: Re: find: missing argument to -exec
In-Reply-To: <3AB14205.4558F8DB@kpnqwest.no>
Message-ID: <Pine.LNX.4.10.10103151817450.18457-100000@atlas.cs.cuc.edu>
MIME-Version: 1.0

On Thu, 15 Mar 2001, Stein M. Eliassen wrote:

>Hi,
>
>When trying:
>find . -mtime 1 -exec rm {}\ ;
>
>I'm receiving 'find: missing argument to -exec', I've tried several variants
>too.
>
>Even searched the archives and found some post's regarding the subject, but I'm
>still not able to solve it.
>
>Someone knows what's the problem here?

Your familiarity with find?
not 
find . -mtime 1 -exec rm {}\ ;
but
find . -mtime 1 -exec rm {} \;

-exec command ;
       Execute command; true if 0 status is returned.  All
       following arguments to find are taken to  be  argu-
       ments  to  the command until an argument consisting
       of `;' is encountered.  The string `{}' is replaced
       by the current file name being processed everywhere
       it occurs in the arguments to the command, not just
       in arguments where it is alone, as in some versions
       of find.  Both of these constructions might need to
       be  escaped  (with a `\') or quoted to protect them
       from expansion by the shell.  The command  is  exe-
       cuted in the starting directory.

-- 
---- In view of the NSA's non-cooperation with Congress over Echelon ----
drug anthrax rift valley lassa DNA RNA plutonium president bomb heroin
(Protest vote.  Let's see if they have a counter.)


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019