[comp.unix.questions] How do you unarchive with TAR?

TJS111@psuvm.psu.edu (Thomas J. Snively) (11/16/90)

Recently, I've been getting in to getting cool things for free off the
netnews by downloading things and such.  I've had mild success, but I'm
stuck on this tar thing.

Ok, suppose I have a file, foo.foo.tar, ok?  The directions that the
poster says is "Tar this into your favorite directory...."
I can't unarchive anything.  I've read the manual on it several times,
and can't understand it.
If I'm in my home directory, and want to unarchive that whole thing into,
say, /stuff, what do I do?

Please send e-mail.  Thank you very much.

-Tom
******************************************************************************
   Bitnet  : TJS111@psuvm.bitnet                     Makeshift signature.
   Internet: TJS111@psuvm.psu.edu                    No real cool sayings yet.
******************************************************************************

gordon@osiris.cso.uiuc.edu (John Gordon) (11/17/90)

	To un-tar a file, type "tar -xvf <filename>".

kherron@ms.uky.edu (Kenneth Herron) (11/17/90)

In article <1990Nov16.220430.28688@ux1.cso.uiuc.edu> gordon@osiris.cso.uiuc.edu (John Gordon) writes:
>
>	To un-tar a file, type "tar -xvf <filename>".

On System V, that should be "tar -xovf <filename>" or you'll be in
for a nasty surprise :-)

Kenneth Herron

s887212@minyos.xx.rmit.oz.au (Stephen Riehm [Romulis]) (11/18/90)

gordon@osiris.cso.uiuc.edu (John Gordon) writes:


>	To un-tar a file, type "tar -xvf <filename>".

very dangerous practice!!! considering that the tar was created by someone
else on a different machine.. it should be mandatory to use -o (ownership)
flag. I learnt this the hard way some time back when I untarred a directory
without -o and the creator only had permission set to himself, hence I
couldnt touch the files at all.. couldnt even remove the evidence :-)
SYSOPs can be wonderfull people at times :-)

therefor I recommend:
tar -xfvo <filename>

============================================================================
Romulis [Stephen Riehm]	            Royal Melbourne Institute of Technology,
					       (124 Latrobe St., Melbourne.)
s887212@minyos.xx.rmit.oz.au					   Australia.

@>---`--,--( Still Stuck on the wrong side of the deep pink sea )--.--'---<@
======================< Insert Usual Disclaimer >===========================

ralfi@pemstgt.PEM-Stuttgart.de (Ralf Holighaus) (11/21/90)

TJS111@psuvm.psu.edu (Thomas J. Snively) writes:

>Recently, I've been getting in to getting cool things for free off the
>netnews by downloading things and such.  I've had mild success, but I'm
>stuck on this tar thing.

>Ok, suppose I have a file, foo.foo.tar, ok?  The directions that the
>poster says is "Tar this into your favorite directory...."
>I can't unarchive anything.  I've read the manual on it several times,
>and can't understand it.
>If I'm in my home directory, and want to unarchive that whole thing into,
>say, /stuff, what do I do?

1. Change in the desired directory.

2. There may be two possibilities:
	2a) The file foo.foo.tar is a tar archive file, that means it
	    contains files

	2b) The file foo.foo.tar is on an archive disk

   As you downloaded the file, i suppose case 2a) will be the right thing.

3. For extracting the files of the 2a) archive file, simply use
	tar xvf - < foo.foo.tar
   It tells tar to extract files, but read from the standard input.

Rgds

Ralf.

-- 
| Programmentwicklung   fuer    Microcomputer  |     Ralf U. Holighaus      |
| PO-Box 810165          Vaihinger Strasse 49  |     >> PEM Support <<      |
| D-7000 Stuttgart 80            West Germany  | holighaus@PEM-Stuttgart.de |
| VOICE: x49-711-713045   FAX: x49-721-713047  | ..!unido!pemstgt!ralfi     |

shwake@raysnec.UUCP (Ray Shwake) (11/22/90)

s887212@minyos.xx.rmit.oz.au (Stephen Riehm [Romulis]) writes:

>therefor I recommend:
>tar -xfvo <filename>

	... except that not all implementations support the -o (set ownership
	to that of extractor) option. SCO's Xenix and UNIX, for example, do
	not support it.

jmm@eci386.uucp (John Macdonald) (11/22/90)

In article <6277@minyos.xx.rmit.oz.au> s887212@minyos.xx.rmit.oz.au (Stephen Riehm [Romulis]) writes:
|
|therefor I recommend:
|tar -xfvo <filename>
|

I recommend the same general practice, but I suggest writing it as:

tar -xvfo <filename>
       ^^

The "fo" is an easy way of commenting on the competence of the person
who made the default mechanism to be the choice that cannot be
recovered from.
-- 
Cure the common code...                      | John Macdonald
...Ban Basic      - Christine Linge          |   jmm@eci386