Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 4560 invoked from network); 9 Oct 2002 21:12:55 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 9 Oct 2002 21:12:55 -0000 Received: (qmail 5616 invoked by uid 97); 9 Oct 2002 21:13:36 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 5599 invoked by uid 97); 9 Oct 2002 21:13:36 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 5583 invoked by uid 98); 9 Oct 2002 21:13:35 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-ID: From: "Shackelford, John-Mason" To: 'Ant Users List' Subject: RE: Delete all but the most recent N files Date: Wed, 9 Oct 2002 16:12:37 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Richard, Great idea! Now I am using the following nasty shell line, but it would be a great task. ls -1 -t | tail -n $[`ls -1 | wc -l` -150] | perl -n -e 'print $_;chomp $_;unlink("$_");' | cat -n ^^^^ removes all but the most recent 150 files in the current directory John-Mason Shackelford Software Developer NCS Pearson - Measurement Services 2510 North Dodge St. Iowa City, IA 52245 319-354-9200x6214 shacjo@ncs.com **************************************************************************** This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. **************************************************************************** -- To unsubscribe, e-mail: For additional commands, e-mail: