Article View: comp.sys.next.sysadmin
Article #1278Re: bug in tar, anyone fixed it?
From: Mark Adler
Date: Wed, 07 Oct 1992 21:03
Date: Wed, 07 Oct 1992 21:03
41 lines
2626 bytes
2626 bytes
Zenon Fortuna admirably does some testing and concludes: >> The original posting was about tar-like program which should handle names >> longer than 100 characters. >> MANY PEOPLE answered, that the gnutar is the solution. Somebody is wrong :) gnutar is indeed *a* solution. You did not follow your test through to its conclusion, which is to reextract the files. Yes, the names (including paths) longer than 100 characters get renamed to @@MaNgLeD.n, where n is an integer. BUT, there is a file written at the end of the tar file that contains the *real* names for these "mangled" file names, and when doing a "gnutar x", this file is read and the mangled names are renamed to their proper, longer than 100 character, full names. I tried this on /NextDeveloper/Apps/InterfaceBuilder.app, which has many name/paths longer than 100 characters. I said "a" solution as opposed to "the" solution, since this doesn't help when you want to extract a particular file without extracting all of them. There may be a way to do that with gnutar that I don't know, but it would take two passes of the file, since the name information is at the end. Or one pass in which all the files with mangled file names are extracted. Actually, let me try that ... Hmm, doesn't quite work. A "gnutar xvf - @@MaNgLeD.\*" got all the files like that, but at the end it was not able to rename them to where they belonged, since the directories did not exist. I might call this a bug in gnutar, since I can imagine a situation in which a long name is the only one in that directory, and then the original extract might fail. gnutar does seem to be able to make at least one directory down, but maybe not more. As someone else mentioned, bigtar is also only a partial solution, since much of the tar functionality seems to be missing in bigtar. Though it does work for long names. For backups though, I would prefer gnutar, since I may have to restore the files on a non-NeXT machine. I can find or make gnutar on another machine, but not bigtar. Mark Adler madler@cco.caltech.edu
Technical Details
Message-ID:
<1avjb7INN848@gap.caltech.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!think.com!sdd.hp.com!elroy.jpl.nasa.gov!nntp-server.caltech.edu!madlerReferences:
<ti6ls.718300894@tuhhco> <1992Oct6.204852.16384@wam.umd.edu> <1992Oct6.193147.17559@resonex.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!sdd.hp.com!elroy.jpl.nasa.gov!nntp-server.caltech.edu!madler From: madler@cco.caltech.edu (Mark Adler) Newsgroups: comp.sys.next.sysadmin Subject: Re: bug in tar, anyone fixed it? Date: 7 Oct 1992 21:03:35 GMT Organization: California Institute of Technology, Pasadena Lines: 41 Message-ID: <1avjb7INN848@gap.caltech.edu> References: <ti6ls.718300894@tuhhco> <1992Oct6.204852.16384@wam.umd.edu> <1992Oct6.193147.17559@resonex.com> NNTP-Posting-Host: sandman.caltech.edu