On Saturday 22 May 2004 12:54, Ken Schneider wrote:
-----Original Message----- From: pinto
To: SuSE List 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 ...
" Find missing argument to `-exec' "
...
____________
Try removing the trailing ; from the find line.
Perhaps find has a feature I don't understand, but as far as I know the semicolon is required. The problem I see is that the semicolon needs to be protected from the shell. Something like this: find ./test -mtime +7 -exec rm -f {} \ ; I can't speak to the correctness of the rest of the command but am highly suspicious of the "\*" in the original version given above. -- Robert C. Paulsen, Jr. robert@paulsenonline.net