bizzare behaviour of stock tar (4.0f PK7)

From: Bentley, Adam \( Dist \) (Adam.Bentley@eme.co.uk)
Date: Mon Mar 22 2004 - 12:21:15 EST


Does anyone know if there's a fix for the following issue :-

Unpacking a tar archive but wanting to restore to an alternative
location I use

tar sxvf sometarfile.tar

so leading '/'s are chopped off the files and they are restored below my
current location...

using this or its alternative form

tar xPvf "/" sometarfile.tar

seems to have the same effect on filename with '&' in them

eg...

myserver # tar tf /tmp/test.tar
/tmp/foo
/tmp/foo/cb_isolatedl&c_h_visax
/tmp/foo/cb_isolatedl&c_h_visax_no
/tmp/foo/cb_isolatedl&c_v_visax
/tmp/foo/cb_isolatedl&c_v_visax_no
myserver # pwd
/tmp/foo2
myserver # tar xvsf /tmp/test.tar
blocksize = 20
x tmp/foo
x tmp/foo/cb_isolatedl/c_h_visax, 243 bytes, 1 tape blocks
x tmp/foo/cb_isolatedl/c_h_visax_no, 352 bytes, 1 tape blocks
x tmp/foo/cb_isolatedl/c_v_visax, 239 bytes, 1 tape blocks
x tmp/foo/cb_isolatedl/c_v_visax_no, 348 bytes, 1 tape blocks

is there a fix or flag to resolve this? It works as expected when
unpacking without using 's' or 'P' options with tar

thanks all.

Adam Bentley
Unix Administrator
Powergen UK.

___________________________ Disclaimer Notice __________________________
This message and any attachments are confidential and should only be read
by those to whom they are addressed. If you are not the intended recipient, please contact us, delete the message from your computer and destroy any copies. Any distribution or copying without our prior permission is
Prohibited.
 
Internet communications are not always secure and therefore the Powergen
Group does not accept legal responsibility for this message. The recipient is responsible for verifying its authenticity before acting on the
contents. Any views or opinions presented are solely those of the author
and do not necessarily represent those of the Powergen Group.

Registered addresses:
 
East Midlands Electricity Distribution plc,
Westwood Way, Westwood Business Park, Coventry, CV4 8LG
Registered in England & Wales No. 2366923.



This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 10:49:54 EDT