extracting tar files with absolute pathnames relatively

Ric Urrutia ric at Apple.COM
Sat Apr 29 04:41:25 AEST 1989


In article <202 at psgdc> rg at psgdc.UUCP (Dick Gill) writes:
>In article <2620 at ssc-vax.UUCP> ray3rd at ssc-vax.UUCP (Ray E Saddler III) writes:
>>In article <1501 at cfa205.cfa250.harvard.edu>, todd at cfa250.harvard.edu (Todd Karakashian) writes:
>>> I am in posession of tapes containing tarfiles with absolute
>...
>>
>>Make a link (symbolic in my instance) in the /usr directory.  The
>>link name would be 'foo', and would simply point to /temp.
>>
>>It works quite nicely.
>>
>This sounds to simple and straightforward to be true. Walk me


The way that I do is is by using chroot(1m) to change my root directory for the tar command.  For example:  If I have a tar tape with absolute pathnames and 
wish to read them into a new directory, I can do the following:
	mkdir /new
	cp /bin/sh /new
	cp /usr/bin/tar /new
	chroot /new sh (invoke sh and make /new the new root)
	tar xvf ????
	exit the temporary shell by hitting ctrl/d (this puts you back to normal)
	rename your directory



More information about the Comp.unix.questions mailing list