image
image

Go Back   macosx.com > Mac Help Forums > Mac OS X System & Mac Software

Reply
 
Thread Tools
  #1  
Old June 2nd, 2001, 09:43 AM
rharder's Avatar
Do not read this sign.
 
Join Date: Mar 2001
Location: Virginia, USA
Posts: 1,186
Thanks: 0
Thanked 0 Times in 0 Posts
rharder is on a distinguished road
Question Does tar's z option compress on the fly?

When using tar (or gnutar or star) does the z parameter compress the data all in one fell swoop or does it tar the directories and then zip it?

The reason I'm wondering is that when I backup my OS X to my Win98 box, my 100baseT network only gets 200K throughput, so if I could compress the data that would help me out.

In other words, if I execute
Code:
% <b>sudo gnutar cpvzf /backup/usr.tar /usr</b>
does that compress the stream across the network (to the /backup mount) or does it tar across the network, read it back from the network, compress it, and write it back across the network?

BTW, has anyone gotten star to compile on OS X? It's supposed to be an ultra-fast tar.

-Rob
__________________
There are only 10 kinds of people in the world:
Those who understand binary, and those who don't.
Reply With Quote
  #2  
Old June 2nd, 2001, 07:20 PM
RacerX's Avatar
Old Rhapsody User
 
Join Date: Apr 2001
Location: US version of Siberia
Posts: 2,571
Thanks: 0
Thanked 2 Times in 2 Posts
RacerX will become famous soon enoughRacerX will become famous soon enough
I have always needed to add the zip (.z) or gnuzip (.gz) after creating the my tar archive. gnutar never gave me all that much in the way of space savings. I had moved most of my things off my original drive to my Indy when I got my 30 GB drive.
Reply With Quote
  #3  
Old June 4th, 2001, 07:53 AM
Registered User
 
Join Date: Jun 2001
Posts: 204
Thanks: 0
Thanked 0 Times in 0 Posts
howardm4 is on a distinguished road
It does neither of the things you describe but it APPEARS to do #1.

What it does in reality is setup a pipeline so that the gzip binary is transparently called and the final output is sent to the final
destination.

It is equiv to "tar cvf - <directory> | gzip -c </destination/tarball.tar.gz>

Reply With Quote
  #4  
Old June 6th, 2001, 05:33 PM
Registered User
 
Join Date: Apr 2001
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
genecutl is on a distinguished road
Quote:
Originally posted by howardm4
It is equiv to "tar cvf - <directory> | gzip -c </destination/tarball.tar.gz>

The benefit of using the syntax listed above, is you can add additional flags for gzip such as this:

tar -cvf <dir> | gzip -c --best > <dir.tgz>

which gives you the maximal compression out of gzip.

Reply With Quote
  #5  
Old June 6th, 2001, 05:44 PM
Registered User
 
Join Date: Apr 2001
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
genecutl is on a distinguished road
Quote:
Originally posted by howardm4
It is equiv to "tar cvf - <directory> | gzip -c </destination/tarball.tar.gz>

The benefit of using the syntax listed above, is you can add additional flags for gzip such as this:

tar -cvf <dir> | gzip -c --best > <dir.tgz>

which gives you the maximal compression out of gzip.

Reply With Quote
  #6  
Old June 9th, 2001, 10:21 PM
Registered User
 
Join Date: Jun 2001
Posts: 204
Thanks: 0
Thanked 0 Times in 0 Posts
howardm4 is on a distinguished road
--best is usually a pretty waste of time. The change in compression vs. the
increased runtime isn't worth it.

Just use a better/different tool such as bzip2
Reply With Quote
  #7  
Old June 11th, 2001, 10:35 AM
rharder's Avatar
Do not read this sign.
 
Join Date: Mar 2001
Location: Virginia, USA
Posts: 1,186
Thanks: 0
Thanked 0 Times in 0 Posts
rharder is on a distinguished road
So when I pipe the tar command to gzip or bzip2 or whatever, does <em>that</em> happen on the fly or does it write the whole tar file to /tmp and <em>then</em> compress it?

-Rob
__________________
There are only 10 kinds of people in the world:
Those who understand binary, and those who don't.
Reply With Quote
  #8  
Old June 11th, 2001, 12:34 PM
Registered User
 
Join Date: Jun 2001
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
offets is on a distinguished road
You have to use the 'z' first, because its all done in order.

Example tar zxvf file.tar.gz

Reply With Quote
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
iCal's reminder option jeepster485 Mac OS X System & Mac Software 0 June 13th, 2003 11:07 PM
OS switching with Startup Manager (option key) dlloyd Mac OS X System & Mac Software 0 April 25th, 2003 12:03 PM
option click an app in the dock and.. roachswarm Mac OS X System & Mac Software 1 October 15th, 2001 05:37 PM
Cannot boot except with option key llewell Mac OS X System & Mac Software 2 October 25th, 2000 01:09 PM


All times are GMT -5. The time now is 11:50 AM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.