From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Bentley, Adam \( Dist \)" Newsgroups: gmane.os.tru64.managers Subject: SUMMARY: bizzare behaviour of stock tar (4.0f PK7) Date: Tue, 23 Mar 2004 10:05:58 +0000 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: <57B8273EB1E40A41AC7B94143007E0893A9E4B@CORWWPKSEXV01.corp.pg.eon.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1080036733 772 80.91.224.253 (23 Mar 2004 10:12:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 23 Mar 2004 10:12:13 +0000 (UTC) Original-X-From: tru64-unix-managers-owner-gotm-tru64-unix-managers=m.gmane.org@sws1.ctd.ornl.gov Tue Mar 23 11:12:08 2004 Return-path: Original-Received: from sws1.ornl.gov ([160.91.1.101]) by deer.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 1B5itD-0006zp-00 for ; Tue, 23 Mar 2004 11:12:07 +0100 Original-Received: (qmail 27764 invoked by uid 5); 23 Mar 2004 10:11:45 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 27749 invoked by uid 49493); 23 Mar 2004 10:11:45 -0000 Original-Received: from Adam.Bentley@eme.co.uk by sws1 by uid 49491 with qmail-scanner-1.16 (iscan: v3.1/v5.600-1011/622/49252. clamscan: 20030605. spamassassin: 2.55. Clear:SA:0(-5.8/5.0):. Processed in 1.667557 secs); 23 Mar 2004 10:11:45 -0000 Original-Received: from unknown (HELO emroute2.cind.ornl.gov) (160.91.86.17) by 0 with SMTP; 23 Mar 2004 10:11:43 -0000 Original-Received: from emroute2.cind.ornl.gov (LOCALHOST [127.0.0.1]) by emroute2.cind.ornl.gov (PMDF V6.2-X20 #30899) with ESMTP id <0HV000KADXNI8V@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Tue, 23 Mar 2004 05:11:42 -0500 (EST) Original-Received: from corpgpksmsw01.pgen1.com ([217.158.191.215]) by emroute2.cind.ornl.gov (PMDF V6.2-X20 #30899) with ESMTP id <0HV000L3LXN070@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Tue, 23 Mar 2004 05:11:25 -0500 (EST) Original-Received: from corwwpksexn01.corp.pg.eon.net (unverified) by corpgpksmsw01.pgen1.com (Content Technologies SMTPRS 4.3.10) with ESMTP id for ; Tue, 23 Mar 2004 10:06:25 +0000 Original-Received: from CORWWPKSEXV01.corp.pg.eon.net ([10.80.96.32]) by corwwpksexn01.corp.pg.eon.net with Microsoft SMTPSVC (5.0.2195.5329); Tue, 23 Mar 2004 10:05:57 +0000 Original-To: tru64-unix-managers@ornl.gov X-MIMEOLE: Produced By Microsoft Exchange V6.0.6375.0 Thread-Topic: SUMMARY: bizzare behaviour of stock tar (4.0f PK7) Thread-Index: AcQQvEfBLAPt1rBQQHmPktzbt+rTpwAAL3HQ content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: X-OriginalArrivalTime: 23 Mar 2004 10:05:57.0728 (UTC) FILETIME=[6FB68600:01C410BE] Xref: main.gmane.org gmane.os.tru64.managers:6674 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:6674 My thanks to Dr Blinn, Michael Polnick and Charles Richmond. It would appear there is a buglet in the version of tar on 4.0fpk7. However there are older versions of tar lurking on the system which work as expected. See responses below :- -----Original Message----- On Monday, March 22, 2004, at 11:57 AM, Bentley, Adam (( Dist )) wrote: > > 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 =3D 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 ------------------------------------------------------------------------ - Michael Polnick=20 ------------------------------------------------------------------------ - This is strange. Workaround: Use gtar, it does it right. Regards Michael ------------------------------------------------------------------------ - Dr Thomas P. Blinn ------------------------------------------------------------------------ - It's possible that if the problem was understood, there might be a fix in V4.0F PK8. I'd have to go find the tar/pax/cpio source to see if it has any edit history. It's also possible that the tar from, say, V4.0F unpatched, or the tar from the "OSFOBSOLETE" subset will work. If you've got the "obsolete" tar loaded, the path should be /usr/opt/obsolete/usr/bin/tar or /usr/opt/obsolete/sbin/tar and sometimes that old tar works "better" (as expected). The saveset format should be completely compatible. ------------------------------------------------------------------------ - Charles Richmond ------------------------------------------------------------------------ - If you have the "obsolete" set installed then the following works: /usr/opt/obsolete/usr/bin/tar -xvsf xxxx.tar koibito> /usr/opt/obsolete/usr/bin/tar -xvsf try.tar tar: blocksize =3D 20 x 1&2, 0 bytes, 0 tape blocks x 2&3, 0 bytes, 0 tape blocks x 3&4, 0 bytes, 0 tape blocks koibito> ls -l total 10 -rw-r--r-- 1 cmr system 0 Mar 22 12:49 1&2 -rw-r--r-- 1 cmr system 0 Mar 22 12:49 2&3 -rw-r--r-- 1 cmr system 0 Mar 22 12:49 3&4 -rw-r--r-- 1 cmr system 10240 Mar 22 12:50 try.tar -- thanks to all... Adam. ___________________________ 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. =20 Internet communications are not always secure and therefore the Powergen=20 Group does not accept legal responsibility for this message. The recipient= is responsible for verifying its authenticity before acting on the=20 contents. Any views or opinions presented are solely those of the author=20 and do not necessarily represent those of the Powergen Group.=20 Registered addresses: =20 East Midlands Electricity Distribution plc, Westwood Way, Westwood Business Park, Coventry, CV4 8LG Registered in England & Wales No. 2366923.