Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Aug 2001 10:39:17 +1000
From:      "MurrayTaylor" <MurrayTaylor@bytecraftsystems.com>
To:        "Brian T.Schellenberger" <bts@babbleon.org>, "Paul Branston" <apbran@rannoch.demon.co.uk>, "David Okeby" <david@okeby.com>
Cc:        <freebsd-questions@FreeBSD.ORG>
Subject:   Re: shell script to remove dated files
Message-ID:  <005f01c13023$093150a0$2a7627cb@bytecraft.au.com>
References:  <FMEEKJADHLBHCKHGCEKEOEOPCEAA.david@okeby.com> <20010828110441.C31370@rannoch.demon.co.uk> <01082808372107.26623@i8k.babbleon.org>

next in thread | previous in thread | raw e-mail | index | archive | help

----- Original Message -----
From: "Brian T.Schellenberger" <bts@babbleon.org>
To: "Paul Branston" <apbran@rannoch.demon.co.uk>; "David Okeby"
<david@okeby.com>
Cc: <freebsd-questions@FreeBSD.ORG>
Sent: Tuesday, August 28, 2001 10:37 PM
Subject: Re: shell script to remove dated files


> On Tuesday 28 August 2001 06:04, Paul Branston wrote:
> > On Tue, Aug 28, 2001 at 05:31:44AM +0800, David Okeby wrote:
> > > Hi,
> > >
> > > How do I write a shell script that removes old files?  Say something
of
> > > the order of two weeks old.
> > >
> > > Thanks
> > >
> > > David
> > > david@okeby.com
> >
> > have a read at the find man page. You need somethimg like
> >
> > find /path -mtime +14 -exec rm {} \;
>
> I recommend -atime instead.  THis way if they've been reading it, it won't
> vanish on them.  Of course it depends on the purpose of the script.
>

I have an unchecked suspicion that windoze explorer via samba 'accesses' the
files
on any/every directory display ...
therefore the files will never age

> >
> > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > with "unsubscribe freebsd-questions" in the body of the message
>
> --
> Brian T. Schellenberger . . . . . . .   bts@wnt.sas.com (work)
> Brian, the man from Babble-On . . . .   bts@babbleon.org (personal)
>
> --------------------> Free Dmitry Sklyarov! <-------------------------
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
>


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?005f01c13023$093150a0$2a7627cb>