Mike Corbeil wrote:
>
> Brian T. Schellenberger wrote:
>
> > In the vain hope of forestalling a number of "you moron" followups, I
> > will point out that I saw the recent posting explaining that there's a
> > "y" option that does exactly this. In my defense, it's not in the "man"
> > page.
>
> man or documentation page bug.
>
> y option for what? I just checked the man pages for tar and bzip2 and also
> didn't see any mention of a y option.
Yes, exactly.
tar xvyf foo.tar.bz2
extracts and unzips in a single step.
Cool, eh? Undocumented, alas.
>
> > Yeah, I'm more a Unix person than a Linux person, so I checked "man"
> > rather than "info." But I checked "info" just now and it's even worse:
> > It claims that the "I" option does bzip rather than the "y" option.
>
> Why not just use bzip2 and tar separately? Or are you talking about some other
> tool?
Well, that way I save *two* steps:
1. bunzip
2. rm the expanded tar file.
Plus sometimes I save a third step:
3 Finding a parition big enough for the expanded file to go.
>
> > "Brian T. Schellenberger" wrote:
> > >
> > > I find .tar.gzip and .tgz files much more convenient becuase of the
> > > integrated support for the gzip:
> > >
> > > tar xvzf foo.tgz
> > >
> > > does the whole thing.
>
> Yep. The only reason I haven't used this more than once is because I already
> knew tar and gzip, don't need all tar files zipped, don't do tar'ing and
> zip'ing an extraordinary amount, and using the tools separately means needing
> to remember one less option. If I used both functions combined, often, then
> I'ld use only tar with xvzf.
>
> Alas, dude, it's mostly a free world.
>
> > > But the answer the original question, the easist way is
> > >
> > > bzcat foo.tar.gz2 | tar xvf -
>
> Depends on what the person wants to do and it's .bz2.
>
> Besides, that's really no easier than the following, or at least not so much
> easier that it's worthy of note:
>
> % bunzip2 foo.tar.gz2 ; tar xvf foo.tar
But then you need to recompress it when you're done or waste a boatload
of disk space. No matter how big my disks get I never seem to have
boatloads of empty disk space, at least not in the partitions were I
really need them.
> (or running the two commands from separate prompts)
>
And I'd argue that this is easier for newbies, who don't really have
much call for using gzip/bzip/gunzip/bunzip/bcat/zcat anyway . . . an
extra option is surely easier.
Though 'twould be even better if tar just recognized the magic numbers
and acted accordingly.
Though OTOH this is the expert list, so I'm not sure if the needs of
newbies are relavent.
--
"Brian, the man from babble-on" [EMAIL PROTECTED]
Brian T. Schellenberger http://www.babbleon.org
Support http://www.eff.org. Support decss
defendents.
Support http://www.programming-freedom.org. Boycott amazon.com.