Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!haven!adm!xadmx!Kemp@dockmaster.arpa From: Kemp@dockmaster.arpa Newsgroups: comp.unix.questions Subject: extracting tar files with absolute pathnames relatively Message-ID: <19244@adm.BRL.MIL> Date: 22 Apr 89 03:01:18 GMT Sender: news@adm.BRL.MIL Lines: 31 Todd, I don't know of any good way to restore files from a tar tape that was created with absolute pathnames, but I do have a couple of bad ways (if you can become superuser, or get the cooperation of one). 1) If you want to extract only files rooted in a directory that does not exist on your system, then create a symbolic link to where you want them to go. For example if you don't currently have /usr/bin/foo, and you want to restore files /usr/bin/foo/... into /temp/foo/..., cd /usr/bin ln -s /temp/foo Or if /temp/foo is to be in the same partition as /usr/bin/foo, you could just restore the tape as is, and then cd /usr/bin mv foo /temp/foo 2) If /usr/bin/foo already exists and you don't want to mess with it, or if the tape contains lots of different first level directories, you could chroot to /tmp, restore the tape, and then mv the files to where you want them. DISCLAIMER: I have used method #1, but not #2. MORAL: **Don't** write tar tapes with absolute pathnames, unless you are distributing system software. Dave Kemp