Path: utzoo!utgpu!watmath!att!pacbell!ames!haven!adm!xadmx!rbj@dsys.ncsl.nist.gov From: rbj@dsys.ncsl.nist.gov (Root Boy Jim) Newsgroups: comp.unix.questions Subject: extracting tar-archive to directories Message-ID: <20552@adm.BRL.MIL> Date: 9 Aug 89 00:52:20 GMT Sender: news@adm.BRL.MIL Lines: 42 ? 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? Uh oh. You sound like you have a tape made with something like tar c /usr By now, you should be figuring out that you should *never* make tar tapes with absolute pathnames on them. Use relative names: cd /; tar c usr This is such an annoying problem that newer versions of tar (unfortunately, most vendors have yet to ship them) include an option to remove the initial `/', making tapes created with the above two methods effectively the same. One such version is GNU tar, available at an archive site near you. 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. Supposedly, the -i option exists to ignore bogus checksums, but I can get it to work on our system, SunOS 3.5. Good luck. ? Regards ? Geir Arnesen ? /* ? * Geir Arnesen - Aftenposten ? * adress: Akersgt.51, P.b. 1178, Sentrum, 0107 Oslo 1, Norway ? * UUCP: ...mcvax!ndosl!aftp!arnesen ? * Internet: arnesen@aftenp.uu.no ? * Phone: +47-2-863232 Priv: +47-2-809133 FAX: +47-2-426325 TLX: 71230 aftp N ? */ Root Boy Jim Have GNU, Will Travel.