Mailinglist Archive: opensuse (4547 mails)

< Previous Next >
Re: [SLE] Backup script, to date-stamp file & delete backup files Older than 7 days
  • From: "Ken Schneider" <suselist@xxxxxxxx>
  • Date: Sat, 22 May 2004 13:54:48 -0400
  • Message-id: <WorldClient-F200405221354.AA54484890@xxxxxxxx>


-----Original Message-----
From: pinto <pinto45@xxxxxxxxxxxxxxx>
To: SuSE List <suse-linux-e@xxxxxxxx>
Date: Sat, 22 May 2004 17:20:13 +0000
Subject: [SLE] Backup script, to date-stamp file & delete backup files
Older than 7 days

> am trying this script :-
> ................................
> #!/bin/sh
> # backup /var
> #
> cd ~
> exec tar czvf /bup/var`date
> +%y%m%d`.tar.gz /var/named /var/cron/tabs /var/spool/mail
> /usr/X11R6/lib/X11/app-defaults /usr/X11R6/lib/X11/fonts/greek
> {} \; >/dev/null 2>&1
> # delete /bup files older than 7 days
> cd /bup
> find ./test -mtime +7 -exec rm -f {} \* ;<--remove, not needed
> cd
> ...............................
>
> . . . But, the "find & Delete" line is not working :(
>
> < find ./test -mtime +7 -exec rm -f {} \* ; > does not run, and,
> complains :
>
> " Find missing argument to `-exec' "
>
> What do I need, please, to make it find and delete backup files older
> than 7
> Days ?
>
> thanks
>
> ____________
>
> sent on Linux
>
> ____________
>
>
Try removing the trailing ; from the find line.

Ken



< Previous Next >
Follow Ups
References