-----Original Message----- From: pinto <pinto45@aig.forthnet.gr> To: SuSE List <suse-linux-e@suse.com> 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