Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 May 2001 12:43:27 +0100
From:      "Michael Bartlett" <michael@i-syt.com>
To:        "Andrey Simonenko" <simon@comsys.ntu-kpi.kiev.ua>
Cc:        <freebsd-questions@FreeBSD.ORG>
Subject:   Re: script to archive old files
Message-ID:  <043301c0e2b4$786e7770$cfe89298@LUCY>
References:  <03ba01c0e2ae$49847be0$cfe89298@LUCY> <013601c0e2a9$9f4f5220$6d36120a@comsys.ntukpi.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
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" <simon@comsys.ntu-kpi.kiev.ua>
To: "Michael Bartlett" <michael@i-syt.com>
Cc: <freebsd-questions@FreeBSD.ORG>
Sent: Tuesday, May 22, 2001 11:26 AM
Subject: Re: script to archive old files


>
> ----- Original Message -----
> From: Michael Bartlett <michael@i-syt.com>
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?043301c0e2b4$786e7770$cfe89298>