[comp.unix] Reading Tar files

hansell@cis.ohio-state.edu (Timothy Hansell) (04/13/90)

Does anyone out there know of a utility or a method that allows
tarred files to be restored to other than the file name they were
created with.

	The problem I have is this. I have a tar tape that was created
with ABSOLUTE PATHNAMES. When I go to untar it it wants to put the files
EXACTLY WHERE THEY CAME FROM ( instead of relative to my current
working directory ). I know I could just untar them where they want to
go and them copy them to where I want them, but that is complicated.
They want to go in /usr, and I do not have super-user privs, so I
must co-ordinate with the system manager on this one.
	I know that it would be possible to write a program to read the
tar file and allow the user to put the files anywhere he wants, and I cannot
believe that no-one has solve this before.
	Please enlighten me !

-tim

ti@altos86.Altos.COM (Ti Kan) (07/04/90)

In article <3614@zorba.Tynan.COM> twc@sun.com (Tim Curry) writes:
>use the chroot command to temporarily change the absolute path.

On UNIX System V rel 4.0, tar supports an 'A' option which lets you
specify a prefix to pre-pend to the path of each file to be extracted.
This can be used to get around the problem of absolute path names.
SOme other implementations of tar may offer a similar feature.

-Ti
-- 
Ti Kan                                                                  \\\
vorsprung durch technik!                                                 \\\
Internet: ti@altos.com                                                /// \\\
UUCP: ...!{sun|sco|pyramid|amdahl|uunet}!altos!ti                    ////////\