eps@toaster.SFSU.EDU (Eric P. Scott) (11/22/90)
In article <558@caslon.cs.arizona.edu> mldemsey@cs.arizona.edu (Matthew L. Demsey) writes: > ok.. perhaps you may think me the dolt.. but after uncompressing >a .tar.z file and have the .tar left; after repeatedly reading the >man pages for tar.. i have no clue how to get rid of the tar and >get an exectuable file.. (this is in reference to files ftped from >orst and the like...).. thank you fore the help in advance... Loki The two most useful invokations of tar are: tar tvf foo.tar which shows you what's in foo.tar and tar xvopf foo.tar which extracts everything from foo.tar Generally you want to mkdir a new directory and cd into it before extracting files. A few tarchives "do this for you" but if you guessed wrong on the "safe side" it's no biggie to do mv dir .. and remove the unneeded directory. Tape archives are padded to block boundaries, so they almost always benefit significantly from compression. If you find a .tar.Z file (*not* the same as a .tar.z file--.z is nominally a Huffman-encoding produced by pack), there isn't much point in uncompress'ing it--just say zcat foo.tar|tar xvopf - to explode it. zcat will add the .Z for you if you omit it. t = table (directory listing) x = extract (copies out of) (t and x are mutually exclusive) v = verbose (displays useful information) About the only time you don't want to use this is when using tar to copy entire directory trees, e.g. tar cvf - *|(cd /somewhere/else;exec tar xvpf -) would produce "double output"--leave the v off one side o = [optional] ignore uid/gid ownership in tarchive ^ this is almost always essential when untarring files from another system; but don't use it when restoring backups! p = preserve date/time information (this flag not in Sys V tar) f = file name follows - = read from stdin (or write to stdout for tar c) -=EPS=-