Hi all! could anyone help me with a very simple script? (it simply doesn't work the variables stuff) and also how can I modify this (tar) to retrive only files which I might get as new from $(find ...) set $FN = etc-$(date +%Y-%m-%d) tar -cf $FN.tar /etc/ gzip $FN.tar THANKS A LOT!!!!!
"Miguel G." wrote:
Hi all!
could anyone help me with a very simple script? (it simply doesn't work the variables stuff) and also how can I modify this (tar) to retrive only files which I might get as new from $(find ...)
set $FN = etc-$(date +%Y-%m-%d) tar -cf $FN.tar /etc/ gzip $FN.tar
THANKS A LOT!!!!!
Try... et FN = etc-$(date +%Y-%m-%d) tar -cf $FN.tar /etc/ gzip $FN.tar Note that I removed the $ from the first line. I haven't tested the whole thing so there might be other problems. -- ____________________________________________________________________ Robert Paulsen http://paulsen.home.texas.net
Hi, #!/bin/sh FN=etc-$(date +%Y-%m-%d) tar -zcf $FN.tar.gz /etc You can also use "-T" to supply a list of files to tar. for complete list of flags (about 12 million of them) run: # info tar -alexm On Sun, 1 Aug 1999, Miguel G. wrote:
could anyone help me with a very simple script? (it simply doesn't work the variables stuff) and also how can I modify this (tar) to retrive only files which I might get as new from $(find ...)
set $FN = etc-$(date +%Y-%m-%d) tar -cf $FN.tar /etc/ gzip $FN.tar
Here is a script I use: #!/bin/sh # do tar with the following options: # c - create, v - verbose f - filename: echo Doing full backup of Data file system... now=`date` title="full backup of /data, from $now" logfile="logs/`date "+%y%m%d"`.data.full.log" name="`date "+%y%m%d"`.data.tar" echo > $logfile echo >> $logfile echo >> $logfile echo >> $logfile tail -f $logfile & tar -cvf -\ /data \ 2>> $logfile |\ dd obs=4000k 2>>$logfile >/opt/data_backup/$name gzip /opt/data_backup/$name echo $now > dates/date.backup.data echo Ready. echo Transcript written to $logfile . This is just my 2 cents worth. "Miguel G." wrote:
Hi all!
could anyone help me with a very simple script? (it simply doesn't work the variables stuff) and also how can I modify this (tar) to retrive only files which I might get as new from $(find ...)
set $FN = etc-$(date +%Y-%m-%d) tar -cf $FN.tar /etc/ gzip $FN.tar
THANKS A LOT!!!!!
-- To unsubscribe, e-mail: suse-linux-e-unsubscribe@suse.com For additional commands, e-mail: suse-linux-e-help@suse.com
participants (4)
-
alexm@hr-60.aus.tx.i3s.net
-
jfondow@sprintmail.com
-
mikkey@dynamo.com.ar
-
paulsen@texas.net