If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > tar gzip of datafiles

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-18-01, 22:21
Winston Douglas
Guest
 
Posts: n/a
tar gzip of datafiles

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.
Reply With Quote
  #2 (permalink)  
Old 04-18-01, 23:39
Steve Walker
Guest
 
Posts: n/a
Quote:
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
Reply With Quote
  #3 (permalink)  
Old 04-19-01, 07:49
Winston Douglas
Guest
 
Posts: n/a
Quote:
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
Reply With Quote
  #4 (permalink)  
Old 04-19-01, 11:33
andrew_webby at ho
Guest
 
Posts: n/a
gunzip -c backup.tar.gz | tar -xvf -

"Winston Douglas" <whdouglas@home.com> wrote in message
news:3ADED018.29B22C5C@home.com...
[color={usenetquotecolor}]> Thanks a lot ![/color]
[color={usenetquotecolor}]>[/color]
[color={usenetquotecolor}]> I am assuming[/color]
[color={usenetquotecolor}]>[/color]
[color={usenetquotecolor}]> gunzip backup.tar.gz | tar -zvf -[/color]
[color={usenetquotecolor}]>[/color]
[color={usenetquotecolor}]> Will layout the files again ?[/color]
[color={usenetquotecolor}]>[/color]
[color={usenetquotecolor}]> Thanks again[/color]
Reply With Quote
  #5 (permalink)  
Old 06-27-01, 16:13
esanchez esanchez is offline
Registered User
 
Join Date: Jun 2001
Location: Mexico
Posts: 1
Quote:
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On