tabanna wrote:

> Hi Sam :)
>
> i am a newby so i don't know too much  :(
>
> .. . . what about making a shell script something like this :-
>
> #!/bin/sh
> # shell script named "bup"
> #  tar etc
> #
> tar czvf   /zip/etcYYMMDD.tar.gz  /etc  /root  /boot
> /and/what/ever/else/you/want
>
> then, at the command line, type 'sh bup' . . . and off you go ?
>
> best :)
>
>  ____________
> sent on  Linux
> ____________
>
> ______________________________________________________________________________
> Si votre email etait sur iFrance vous pourriez ecouter ce message au tel !
> http://www.ifrance.com : ne laissez plus vos emails loins de vous ...
> gratuit sur iFrance :  emails (20 MO, POP, FAX), Agenda, Site perso

That will work.  You don't even have to do 'sh bup' just 'bup' or './bup' if .
isn't in your path.  You want to make sure that /zip is not part of
/and/what/ever/else/you/want though or you'll get the ever expanding file ;-).
You might want to make the tar file name a variable like this:

tar czvf   $1  /etc  /root  /boot /and/what/ever/else/you/want

Then you would invoke the command like this:

./bup /zip/etcYYMMDD.tar.gz


Or, better yet:

tar czvf   /zip/`date '+%y%m%d'`.tar.gz  /etc  /root  /boot
/and/what/ever/else/you/want

then it will set the date automatically for you.



Jan 'Evil Twin' Depner
Biscuit and the Blues Bakers
http://www.francemp3.com/music/artistes.asp?N=1154
http://www.mp3.com/bluesbakers

Reply via email to