Mailinglist Archive: opensuse (4547 mails)

< Previous Next >
Backup script, to date-stamp file & delete backup files Older than 7 days
  • From: pinto <pinto45@xxxxxxxxxxxxxxx>
  • Date: Sat, 22 May 2004 17:20:13 +0000
  • Message-id: <200405221720.13708.pinto45@xxxxxxxxxxxxxxx>
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 {} \* ;
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

____________


< Previous Next >
Follow Ups