mapping BSD filenames to SysV

Richard Goerwitz goer at sophist.uucp
Thu Feb 22 14:44:43 AEST 1990


A few weeks ago I saw a few messages about mapping long BSD file
names to 14-character SysV-usable ones.  My immediate reactions
was to think, "Gee, any piece of software that uses long file names
isn't written for portability.  Don't waste your time."

Golly gee.  Guess who had to de-tar a big archive full of overlong
file names the other day.

In order to do this, I had a choice of either renaming each file
by hand, and then burrowing through the source, or else writing
some sort of utility that would, in utero, perform the necessary
conversions.  Naturally, I opted for the latter.  What I have is
a simple program that reads a tar file once through, looking at
all of the headers to see if there are overlong file names, and
forming a list of them.  On the second pass, all the header blocks
are rewritten with new checksums, lengths, and filenames, and all
occurrences in the text of the filenames in question are rewritten
(i.e. mapped to 14-char lengths) as well.

The program is written in Icon, and I'll be happy to pass it on to
anyone who wants it.  Icon, in case anyone is interested, is the suc-
cessor to Snobol4, and is a full-featured, procedurally oriented pro-
gramming language that is implemented on a wide variety of processors
(mainly in C).  It can be ftp'd from cs.arizona.edu.

I have no connection with the Icon-project except in feeling a certain
amount of awe that one can still get it for free.

   -Richard L. Goerwitz              goer%sophist at uchicago.bitnet
   goer at sophist.uchicago.edu         rutgers!oddjob!gide!sophist!goer



More information about the Comp.unix.questions mailing list