tar for RTP

If I tar something with an absolute path, e.g.

tar cvf root.tar /root

And untar it

tar xvf root.tar


In QNX4, it will use the absolute path, e.g. put the files in /root
In RTP, it will create a new directory “root” in the current dir, and put it
there.

Why is that, and any way around it?
Thanks
Markus

Because it is unsafe to untar with absolute paths. You could overwrite some
system file easily.

QNX4 did that because tar was link to pax and pax did not care… In RTP tar
is port of GNU tar I think and that’s proper behavior. OTOH, pax had nice -s
option allowing you to substitute pathnames on the fly. I believe there is
pax for RTP too and you can use it instead of tar.

“Markus Loffler” <loffler@ces.clemson.edu> wrote in message
news:918g0p$o0i$1@inn.qnx.com

If I tar something with an absolute path, e.g.

tar cvf root.tar /root

And untar it

tar xvf root.tar


In QNX4, it will use the absolute path, e.g. put the files in /root
In RTP, it will create a new directory “root” in the current dir, and put
it
there.

Why is that, and any way around it?
Thanks
Markus
\