Subject: Re: "best way" to unpak tarballs (so many choices)
To: henry nelson <netb@irm.nara.kindai.ac.jp>
From: Axel Scheepers, Operations Via NET.Works NL <ascheepers@vianetworks.nl>
List: netbsd-users
Date: 11/17/2003 22:28:30
henry nelson wrote:

> My notes from when I first started Unix 8 or so years ago have
>     gzip -dc somearchive.tar.gz | tar xf -
> as thee way to unpak tarballs.  Even used it so many times that I got tired
> of typing it and set an alias for it.
> 
> In recent months I've been slowly revamping old installations, and I
> notice there are a lot of ways to do the same thing:
>     pax -zrpe -f somearchive.tar.gz
>     tar -czf somearchive.tar.gz
>     cat sys.tar.gz | (cd /path ; tar zxf -)
> Probably there are a bunch of ways I haven't even come across yet.
> 
> Are there REASONS why a certain archive might be unpaked a certain way?
> Or is it all personal preference?
> 

Tar evolved over time, supporting more options step by step.
Things like -C <directory> et al might not have been available in the 
original (Sixth Edition Unix?) version, hence you would have to use the 
somewhat more verbal version; gzip -dc arc.tar.gz | ( cd /some/where; 
tar -xf - )

You'll probably need something like it when tarring across a network 
like tar cf - some/thing | gzip -9v | ssh me@host dd 
of=some/where/arc.tar.gz

And ofcourse, some personal preference is involved also :-)

gr,
-- 
VIA NET.WORKS Nederland

Axel Scheepers
System Administrator UNIX
phone   +31 40 239 33 93
fax     +31 40 239 33 11
e-mail  ascheepers@vianetworks.nl
pgp id  21A33FE0
http://www.vianetworks.nl/