extracting tar-archive to directories

Hans Jespersen hjespersen at trillium.waterloo.edu
Thu Aug 10 09:47:36 AEST 1989


In article <20552 at adm.BRL.MIL> rbj at dsys.ncsl.nist.gov (Root Boy Jim) writes:
>? From: Geir Arnesen <arnesen at aftp.uucp>
 
>? 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 at trillium.waterloo.edu
uunet!watmath!trillium!hjespersen



More information about the Comp.unix.questions mailing list