Date: July 30, 2001
A tar backup created using absolute path names can only only be restored to the directory from which it was created. One way to restore it to a different directory is by using the pax command.
For example, suppose you receive a tar tape created using absolute path names:
tar -cvf /dev/rmt0 /work/*
but want to restore it to the /test directory. The pax command would be:
pax -rf /dev/rmt0 -s/work/test/p
The -s/work/test/p does the directory change. It functions similar to a "vi" search and replace. The pax command has several other uses such as duplicating directories. See the pax man page for more information.