From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,2f613ccaa18a39c6 X-Google-Attributes: gid1164f8,public From: mark@cita.toronto.edu (Mark Bartelt) Subject: Re: SunOS can't untar OSF/1 tar files? Date: 1996/10/23 Message-ID: #1/1 X-Deja-AN: 191545227 eferences: <54ifma$196@enva1.env.uea.ac.uk> sender: nntp@utcc.utoronto.ca (News) x-nntp-posting-host: rorqual.cita.utoronto.ca organization: Canadian Institute for Theoretical Astrophysics reply-to: mark@cita.utoronto.ca newsgroups: comp.sys.dec [ J.S.Brainard ] >> We have made the recent discovery that SunOS 4.1.3/4 can't tar -xvf >> tar files created under OSF/1 3.x. [...] >> If we create the directories ahead of time tar seems to fill them up for >> us, and tar -tvf has no problems, providing a tedious work around, if >> necessary. [...] >> I've checked the FAQ, but there doesn't seem to be an entry about this >> problem. Have others encountered it? Do you know of any patches >> or efficient, simple work arounds? Yeah, we've encountered it, and it is a nuisance. I haven't checked whether gnutar can deal with the OSF-created tar archives, but if it can, that would probably be a good way to go. As for "an efficient, simple workaround", I generally do something like mkdir -p `tar tf tarfile|sed 's+/[^/]* *$++'|sort|uniq` tar xf tarfile That's not *too* tedious, especially if you encapsulate it in a shell script. (The "mkdir -p" could probably be just "mkdir", now that I think about it.) Anyway, this creates all necessary directories (except, possibly, empty ones which exist in the archive). The "tar x" will spit out an error message for every directory ... tar: foo/bar - cannot create -- Is a directory ... but you can just ignore them. Mark Bartelt 416/978-5619 Canadian Institute for mark@cita.utoronto.ca Theoretical Astrophysics http://www.cita.utoronto.ca/~mark "Sheep not busy being shorn are busy frying" -- Dylan, at a NZ lamb barbecue [ singing "It's all right, ma (I'm only bleating)" ]