Date: Tue, 28 Aug 2001 11:04:41 +0100 From: Paul Branston <apbran@rannoch.demon.co.uk> To: David Okeby <david@okeby.com> Cc: freebsd-questions@freebsd.org Subject: Re: shell script to remove dated files Message-ID: <20010828110441.C31370@rannoch.demon.co.uk> In-Reply-To: <FMEEKJADHLBHCKHGCEKEOEOPCEAA.david@okeby.com>; from david@okeby.com on Tue, Aug 28, 2001 at 05:31:44AM %2B0800 References: <FMEEKJADHLBHCKHGCEKEOEOPCEAA.david@okeby.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 {} \;
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?20010828110441.C31370>
