X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: <470B4F1B.3AD3BCB8@dessent.net> Date: Tue, 09 Oct 2007 02:51:23 -0700 From: Brian Dessent X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: -exec on find(1) broken References: <470B1B1B DOT 2060404 AT columbus DOT rr DOT com> <20071009062547 DOT GA19172 AT suncomp1 DOT spk DOT agilent DOT com> <470B22FF DOT 10107 AT columbus DOT rr DOT com> <470B288E DOT 8060504 AT columbus DOT rr DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Paul McFerrin wrote: > Well, I finally got it! > > find . -type f -mtime +18 -exec /bin/echo {} \; | more > > is the correct syntax. Now I just replace "/bin/echo" with "/bin/rm" > and I ready to go. That's still horribly overcomplicated and inefficient. Use "find . -type f -mtime +18" to see what the results would be and "find . -type f -mtime +18 -delete" to delete them. It's much more efficient to let find do the deleting than worrying about creating a bunch of echo or rm child processes. Brian -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/