[ug-atlosug] Removing leading slashes from directories in a tar file

Matty matty at prefetch.net
Mon Oct 2 13:42:39 PDT 2006


Hi Keith,

You can use the pax utilities "-s" option to do this:

$ pax -rvf archive.tar -s,/some/absolute/directory/,,

There are several pax examples similar to this in the Solaris FAQ.

Thanks,
- Ryan
--
UNIX Administrator
http://prefetch.net

On Mon, 2 Oct 2006, Keith Fleming wrote:

> We have a network node that tars and gzips its hourly data using
> absolute pathnames. The data is untarred/unzipped on a Solaris 8 box. We
> don't have root permission to do the "chroot . tar -xvf" solution. Also,
> installing gnu-tar (plus all of its dependencies) is also out of the
> question. Is there a way to untar the tar file in a directory other than
> the local directory? Any help is greatly appreciated.
>
> The information contained in this message may be confidential to Kodiak Networks, Inc. and its subsidiaries and protected from disclosure. If this message did not reach the intended recipient, or an employee or agent responsible for delivering it to the intended recipient, you are hereby informed that any distribution or copying of this communication is prohibited. If you have received this communication in error, please notify us immediately by replying to the sender of the message and then delete the message. Thank you.
>



More information about the ug-atlosug mailing list