From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Naidu V. T." Newsgroups: gmane.os.tru64.managers Subject: SUMMARY: Deleting files. Date: Sat, 22 Feb 2003 15:07:21 +0400 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: <9CC0EAD054A9324E960A5868EDCB7E66F9D687@EXSERVER01.ohi_net.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1045912272 14448 80.91.224.249 (22 Feb 2003 11:11:12 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 22 Feb 2003 11:11:12 +0000 (UTC) Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.22.101]) by main.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 18mXYI-0003jq-00 for ; Sat, 22 Feb 2003 12:10:43 +0100 Original-Received: (qmail 16038 invoked by uid 5); 22 Feb 2003 11:10:36 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 16029 invoked by uid 49493); 22 Feb 2003 11:10:35 -0000 Original-Received: from Naidu@ohitelecom.com by sws1 by uid 49491 with qmail-scanner-1.14 (clamscan: 0.54. spamassassin: 2.50-cvs. Clear:SA:0(1.1/5.0):. Processed in 0.384384 secs); 22 Feb 2003 11:10:35 -0000 Original-Received: from unknown (HELO emroute3.ornl.gov) (160.91.4.110) by 0 with SMTP; 22 Feb 2003 11:10:35 -0000 Original-Received: from emroute3.ornl.gov (localhost [127.0.0.1]) by emroute3.ornl.gov (PMDF V6.2 #30669) with ESMTP id <0HAP00JVLJ1M1N@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Sat, 22 Feb 2003 06:10:34 -0500 (EST) Original-Received: from EXSERVER01.ohi_net.com ([212.72.22.90]) by emroute3.ornl.gov (PMDF V6.2 #30669) with ESMTP id <0HAP0030GJ0NLF@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Sat, 22 Feb 2003 06:10:04 -0500 (EST) Original-To: tru64-unix-managers@ornl.gov X-MIMEOLE: Produced By Microsoft Exchange V6.0.5762.3 Thread-Topic: SUMMARY: Deleting files. Thread-Index: AcLaYgGYlRMaEkZKEdePcwCgJErftQ== content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: Xref: main.gmane.org gmane.os.tru64.managers:3410 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:3410 Many Thanks to Kevin Fleming,Phil Baldwin,Premjit Nair and Michael James = Bradford.=20 Original Question : > I am looking for a script which can delete files = which are 7 days=20 older with regard to the current system time. Ans: # accesses more than 7 days ago find /some_path -atime +7 -exec = rm {} \; # created more than 7 dyas ago find /some_path -ctime +7 = -exec rm {} \; Regards, >=20 Naidu V.T Senior Support Engineer naidu@ohitelecom.com OHI Telecommunications Phone : +968-603606 EXT 118 Mobile : +968-9443591 Fax : +968-603608