Mailinglist Archive: opensuse (4547 mails)
| < Previous | Next > |
Re: [SLE] find and delete older file
- From: Kenneth Schneider <suselist@xxxxxxxx>
- Date: Fri, 21 May 2004 07:35:49 -0400
- Message-id: <1085139349.22453.19.camel@xxxxxxxxxxxx>
On Fri, 2004-05-21 at 07:11, Kenneth Schneider wrote:
> On Fri, 2004-05-21 at 02:30, Agi Subagio wrote:
> > I have a script that create a backup file in regular schedule (run everyday
> > at 2 AM).
> > But after several weeks, my harddisk is getting full.
> > I want to delete older backup file that not modified/create after 30 days
> > ago.
> >
> > I have used command;
> > $ find ./test -mtime +30 -exec 'rm -f *'
>
> Try this:
>
> $ find ./test -mtime +30 -exec rm -f \*
DUUU.
Forgot the {}.
$ find ./test -mtime +30 -exec rm -f {} \*
>
> > But it seems, the rm command is not work.
> >
> > How to do that?
> >
> > ---
> > This email is protected by Clam AntiVirus and SpamAssassin
> >
>
> --
> Ken Schneider
> unix user since 1989
> linux user since 1994
> SuSE user since 1998 (5.2)
>
--
Ken Schneider
unix user since 1989
linux user since 1994
SuSE user since 1998 (5.2)
> On Fri, 2004-05-21 at 02:30, Agi Subagio wrote:
> > I have a script that create a backup file in regular schedule (run everyday
> > at 2 AM).
> > But after several weeks, my harddisk is getting full.
> > I want to delete older backup file that not modified/create after 30 days
> > ago.
> >
> > I have used command;
> > $ find ./test -mtime +30 -exec 'rm -f *'
>
> Try this:
>
> $ find ./test -mtime +30 -exec rm -f \*
DUUU.
Forgot the {}.
$ find ./test -mtime +30 -exec rm -f {} \*
>
> > But it seems, the rm command is not work.
> >
> > How to do that?
> >
> > ---
> > This email is protected by Clam AntiVirus and SpamAssassin
> >
>
> --
> Ken Schneider
> unix user since 1989
> linux user since 1994
> SuSE user since 1998 (5.2)
>
--
Ken Schneider
unix user since 1989
linux user since 1994
SuSE user since 1998 (5.2)
| < Previous | Next > |