Couple of notes.  Well, lots really.  I have a weakness for pedentry. ;)

A future version of GNU tar, possibly included in Red Hat as soon as
version 7.1, will replace the -I option with -j to provide better script
compatibility with other forms of Unix.

Those used to archiving utilities common on a certain over-rated
windowing system may expect the utility to append "tar.bz2" to the name
of the archive; in Unix-land, you have to name the archive explicitly.

Concrete examples:  To archive the directory "foo" into the archive file
"foo.tar.bz2", first cd to the directory which contains foo, and then

tar cvIf foo.tar.bz2 foo

[the "v" is optional; without it, tar won't fill the screen with a list
of all the files it's processing.  I prefer to leave it out, but do as
thou wilt.]

On systems where bzip2 is not present, you can use gzip; don't forget to
name your archive appropriately to avoid future confusion:

tar czf foo.tar.gz foo

If you expect to send your archives to someone using another form of
Unix, particularly commercial Unices where gzip and bzip2 are less
common, you can use a format compatible with the "compress" utility:

tar cZf foo.tar.Z foo

Finally, if you find yourself on a system that doesn't have GNU tar,
you'll have to invoke the compression utility yourself.  For example,

tar cf foo.tar foo && gzip foo.tar

[substituting bzip2 or compress for gzip, whichever you have/prefer]

Or if disk space is short, these commands will do just what GNU tar can
do -- create the compressed archives without first creating an
intermediate uncompressed file on the disk:

tar cf - foo | gzip > foo.tar.gz

or

tar cf - foo | compress > foo.tar.Z

or

tar cf - foo | bzip2 > foo.tar.bz2



Ask a simple question....




Michael Burger wrote:
> 
> Next time, while in man tar, do a "/bzip"...it'll take you where you
> need to go.
> 
> In the meantime, it's "tar -cIvf" <path/archive.name>
> </path/to/files>"
> 
> On Sat, 24 Feb 2001 16:07:13 +0200 (EET), Silviu Cojocaru wrote:
> 
> >
> >I want to make the tarball of dir using "tar" and "bzip2", could someone
> >tell me how to do that, the tar man page got me totally confused.
> >
> >Thanks in advance for any help.
> >
> >--
> >Silviu Cojocaru
> >[EMAIL PROTECTED] (new email address)
> >_______________________________________________________________________________
> >A Linux machine! because a 486 is a terrible thing to waste!
> >-------------------------------------------------------------------------------
> >
> >
> >
> >_______________________________________________
> >Redhat-list mailing list
> >[EMAIL PROTECTED]
> >https://listman.redhat.com/mailman/listinfo/redhat-list
> >
> 
> _______________________________________________
> Redhat-list mailing list
> [EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/redhat-list



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to