On Saturday, October 19, 2002, at 10:54 AM, Mike wrote:
Pardon me, but that's nonsense! The 'z' flag just pipes the (archived) output internally through gzip, which results in exactly the same compressed file as doing it manually. Wether it is called .tgz or .tar.gz depends solely on what filename you specify after the 'f'. You can simply ungzip the .tgz to get a regular .tar file, but you cannot untar it to get the individually gzipped contents.On Tuesday, October 15, 2002, at 09:44 AM, Josh Kuperman wrote:Copying the /sw/fink/dists archive and using dpkg --get-selections is a much cleaner solution than tarballing the whole directory structure is the cleanest solution, but if you really want the whole Fink tree backed up, here are some useful tar tips:I couldn't even figure out how to get a decent tar archive, let alone a multidisk tar archive. (My first foolish attempt to make a .tgz or /sw/src resulted in a file larger than simply copying -- and was too largre to burn to a single CD anyhow.
If you pass tar the -z flag, as opposed to gzipping the resulting tar file separately, you wind up with a .tgz, which is different than a tar.gz. The first format contains each file individually gzipped, while the latter contains everything archived into a single .tar file, which is then gzipped as a whole, which will almost always result in greater compression.
I have largely switched to using the .tar.gz naming convention, mostly for clarity, but also because some MacOS apps can't make sense of the .tgz suffix -- IIRC, StuffitExpander does something utterly stupid like first uncompressing it into a ".tgz.tar" archive and then untarring that...
Just some data:
miranda:6039> tar cpzf /tmp/manpages.tgz sw/share/man
miranda:6040> tar cpf - sw/share/man | gzip -c > /tmp/manpages.tar.gz
miranda:6041> ll /tmp/manpages*
-rw-r----- 1 derek wheel 3456211 Oct 19 15:49 /tmp/manpages.tar.gz
-rw-r----- 1 derek wheel 3456211 Oct 19 15:41 /tmp/manpages.tgz
Any reduction in files size you can get from doing the gzip manually is by giving it
the '-9' flag to enforce higher compression, but the effect is rather small:
miranda:6042> tar cpf - sw/share/man | gzip -9c > /tmp/manpages9.tar.gz
-rw-r----- 1 derek wheel 3432947 Oct 19 15:51 /tmp/manpages9.tar.gz
If you want really better compression, you can use the 'j' option with fink's tar to create a bzip2 archive, which typically gives about 30% reduction vs. gzip (and also is significantly slower than even gzip -9):
miranda:6047> /sw/bin/tar cpjf /tmp/manpages.tar.bz2 sw/share/man
-rw-r----- 1 derek wheel 2680388 Oct 19 15:54 /tmp/manpages.tar.bz2
It also is somewhat less compatible, but bzip2 now even comes preinstalled with 10.2, so there shouldn't be a great problem with getting it unarchived.
HTH,
Derek
-------------------------------------------------------
This sf.net email is sponsored by:
Access Your PC Securely with GoToMyPC. Try Free Now
https://www.gotomypc.com/s/OSND/DD
_______________________________________________
Fink-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-users
