Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] How do I add a file (zip) to a package without compressing it


2011/7/28 Marghanita da Cruz <marghanita@xxxxxxxxxxxx>:
> I looked at tar but couldn't figure out the option not to compress there
> either. Does Tar compress or not compress by default?

Tar doesn't compress at all - if you want to compress a tar archive
you have to pipe through gzip or something similar *prior* to writing
out the archive, vis-a-vis

tar -czf archive.tgz <source1> <source2> <source3> creates a compressed version

tar -cf archive.tgz <source1> <source2> <source3> creates an
uncompressed version

So you could do something like this <from memory, not checked, YMMV,
if it don't work don't blame me, MAN is your friend etc etc>

tar -czf archive.tgz <source1> <source2>
tar -Af archive.tgz <source3>

This'd add the first two files compressed, and the third uncompressed.
The zip -0 method is easier. :-)

DaZZa