Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 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: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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