From owner-freebsd-questions Tue May 22 4:44:18 2001 Delivered-To: freebsd-questions@freebsd.org Received: from eyemax.eye2eye.net (eyeland.eye2eye.co.za [196.31.83.226]) by hub.freebsd.org (Postfix) with ESMTP id 7671537B43F for ; Tue, 22 May 2001 04:44:12 -0700 (PDT) (envelope-from michael@i-syt.com) Received: from LUCY (213.86.13.163 [213.86.13.163]) by eyemax.eye2eye.net with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id KV7VM6LV; Tue, 22 May 2001 13:36:33 +0200 Message-ID: <043301c0e2b4$786e7770$cfe89298@LUCY> From: "Michael Bartlett" To: "Andrey Simonenko" Cc: References: <03ba01c0e2ae$49847be0$cfe89298@LUCY> <013601c0e2a9$9f4f5220$6d36120a@comsys.ntukpi.kiev.ua> Subject: Re: script to archive old files Date: Tue, 22 May 2001 12:43:27 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG thanks for that i think that find using the ctime flag is probably the best way to go however - here is my problem i have a directory with A LARGE AMOUNT of files in it basically its a record of every mail message that has gone in and out of the box in the last 6 months so when i try this: bash-2.03$ find * -ctime +60 bash: /usr/bin/find: Argument list too long i assume that means - oh sorry, there are just too many files! any ideas? ----- Original Message ----- From: "Andrey Simonenko" To: "Michael Bartlett" Cc: Sent: Tuesday, May 22, 2001 11:26 AM Subject: Re: script to archive old files > > ----- Original Message ----- > From: Michael Bartlett > Newsgroups: lucky.freebsd.questions > Sent: Tuesday, May 22, 2001 3:16 PM > Subject: script to archive old files > > > > hi there > > i'm running out of hdd space at a rapid rate > > i'm trying to figure out how to write a script that will > > > > - gzip all files in a directory that are older than 2 months > > - email the gzip to me > > - delete the files that were gzipped > > > > the few attempts that i have made have been disasterous! > > i'm by no means a l33t ninja scrpiter! > > > > could anyone lend a hand please? > > cheers > > mike > > You can find some good examples in /etc/periodic and > then write your own. > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message