PDA

View Full Version : tar gzip of datafiles


Winston Douglas
04-18-01, 23:21
How can I create a tar zip file without creating an intermediate file(s) ?. I need to do this to create a quick backup to disk but I do not have the disk space to tar the files to a file and then compress the tar file or visa versa.

Thanks.

Steve Walker
04-19-01, 00:39
How can I create a tar zip file without creating an intermediate file(s) ?. I need to do this to create a quick backup to disk but I do not have the disk space to tar the files to a file and then compress the tar file or visa versa.

tar -cvf - <files> | gzip -c > backup.tar.gz

Winston Douglas
04-19-01, 08:49
tar -cvf - <files> | gzip -c > backup.tar.gz

Thanks a lot !

I am assuming

gunzip backup.tar.gz | tar -zvf -
Will layout the files again ?

Thanks again

andrew_webby at ho
04-19-01, 12:33
gunzip -c backup.tar.gz | tar -xvf -

"Winston Douglas" <whdouglas@home.com> wrote in message
news:3ADED018.29B22C5C@home.com...
> Thanks a lot !
>
> I am assuming
>
> gunzip backup.tar.gz | tar -zvf -
>
> Will layout the files again ?
>
> Thanks again

esanchez
06-27-01, 17:13
Thanks a lot !

I am assuming

gunzip backup.tar.gz | tar -zvf -
Will layout the files again ?

Thanks again

with GNU tar you can use

tar -xzvf backup.tar.gz

and that will do the tick.

regards,
esv