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 X-Sent: 15 Mar 2001 23:15:34 GMT From: "Kevin Wright" To: "Stein M. Eliassen" Cc: "Cygwin-Mailing-List" Subject: RE: find: missing argument to -exec Date: Thu, 15 Mar 2001 15:15:46 -0800 Message-ID: <001b01c0ada5$ddac0060$2207640a@holstein-mobile.ASPECTDV.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 In-Reply-To: <3AB14205.4558F8DB@kpnqwest.no> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3612.1700 Importance: Normal Stein, How about: $ find . -mtime 1 |xargs rm from the find man page: -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. It seems that you need the \ next to the ; thus: find . -mtime 1 -exec rm {} \; At least that worked for me. YMMV --Kevin > -----Original Message----- > From: cygwin-owner AT sources DOT redhat DOT com > [mailto:cygwin-owner AT sources DOT redhat DOT com]On Behalf Of Stein M. Eliassen > Sent: Thursday, March 15, 2001 2:28 PM > To: cygwin AT cygwin DOT com > Subject: find: missing argument to -exec > > > 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? > > On another note, it's something wrong with my cygwin-setup since the 'alt > gr'-key doesn't work in the cygwin-shell, but everything is correct from > cmd.exe. > > How do I handle that? > > Cygwin version installed is 1.1.8 on NT4 SP6. > > > Regards > Stein > > -- > Want to unsubscribe from this list? > Check out: http://cygwin.com/ml/#unsubscribe-simple > > -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple