Path: utzoo!utgpu!watmath!watdragon!trillium!hjespersen From: hjespersen@trillium.waterloo.edu (Hans Jespersen) Newsgroups: comp.unix.questions Subject: Re: extracting tar-archive to directories Message-ID: <15806@watdragon.waterloo.edu> Date: 9 Aug 89 23:47:36 GMT References: <20552@adm.BRL.MIL> Sender: daemon@watdragon.waterloo.edu Reply-To: hjespersen@trillium.waterloo.edu (Hans Jespersen) Organization: U. of Waterloo, Ontario Lines: 23 In article <20552@adm.BRL.MIL> rbj@dsys.ncsl.nist.gov (Root Boy Jim) writes: >? From: Geir Arnesen>? Does anyone now if it is possible to extract tar files from tape - to >? another directory/file than it was archived as? > >If you have emacs, you can edit the tar file directly. Find the >header for each file, and change a file name of the form >`/usr/bin' to `usr//bin'. That will keep the checksum the same. >If you don't have emacs, you'll have to write a program. You could always use 'chroot' to move the effective root directory and read the files in to an alternate directory structure. This saves having to edit all the file names. Of course you may need to make a duplicate of /bin/sh, /bin/tar, and mknod the tape device in the new "root" directory ( alternatively a couple of well chosen symlinks would be even better, if you have them). Writting a program seems to be a bit exessive. -- Hans Jespersen hjespersen@trillium.waterloo.edu uunet!watmath!trillium!hjespersen