delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-Spam-Check-By: | sourceware.org |
From: | "Dave Korn" <dave DOT korn AT artimi DOT com> |
To: | <cygwin AT cygwin DOT com> |
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> |
Subject: | RE: -exec on find(1) broken |
Date: | Tue, 9 Oct 2007 10:54:19 +0100 |
Message-ID: | <046a01c80a5a$5ca300e0$2e08a8c0@CAM.ARTIMI.COM> |
MIME-Version: | 1.0 |
X-Mailer: | Microsoft Office Outlook 11 |
In-Reply-To: | <470B288E.8060504@columbus.rr.com> |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
On 09 October 2007 08:07, 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. Will break on paths/files with embedded spaces, use find . -type f -mtime +18 -exec /bin/echo '"{}"' \; | more Also if you're going to turn it into an rm, I'd generally do it in two steps: find . -type f -mtime +18 -exec /bin/echo rm '"{}"' \; > script.sh (read script.sh in editor and make sure it's right!) . ./script.sh cheers, DaveK -- Can't think of a witty .sigline today.... -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |