extracting tar-archive to directories

Root Boy Jim rbj at dsys.ncsl.nist.gov
Wed Aug 9 10:52:20 AEST 1989


? 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?

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 at 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.



More information about the Comp.unix.questions mailing list