Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bionet!agate!garnet.berkeley.edu!ked From: ked@garnet.berkeley.edu (Earl H. Kinmonth) Newsgroups: comp.unix.questions Subject: Re: extracting tar files with absolute pathnames relatively Keywords: tar pathname Message-ID: <23482@agate.BERKELEY.EDU> Date: 23 Apr 89 00:30:28 GMT References: <1501@cfa205.cfa250.harvard.edu> <2620@ssc-vax.UUCP> Sender: usenet@agate.BERKELEY.EDU Organization: University of California, Berkeley Lines: 24 In article <2620@ssc-vax.UUCP> ray3rd@ssc-vax.UUCP (Ray E Saddler III) writes: >In article <1501@cfa205.cfa250.harvard.edu>, todd@cfa250.harvard.edu (Todd Karakashian) writes: >> I am in posession of tapes containing tarfiles with absolute >> pathnames. What I would like to do is to extract these files into a >> different tree structure than they were tarred from. Thus, the >> tarfile /usr/foo/file should go into the disk pathname /temp/file. I >> have been unable to find a way to do this -- does anyone know how? My version of GNU tar will do this very simply. It has a -Pnn option where nn is the number of path elements to strip off. Although this program was originally written to make tar archives under MSDOS, it will also run under UNIX. I use it on a Sun for precisely the task you describe. pdtar is available from the author for non-commercial, non-military uses, in SCO Xenix, Ultrix, BSD UNIX, and MSDOS versions. Earl H. Kinmonth History Department University of California, Davis 916-752-1636 (voice, fax [2300-0800 PDT]) 916-752-0776 secretary ucbvax!ucdavis!ucdked!cck