[comp.sys.xerox] File Directory Problem

ralph@nastassia.laas.fr (Ralph P. Sobek) (05/17/89)

I ran across my problem by accident!  In the normal Sun distribution
of display fonts, they are divided into subdirectories: JIS1, JIS2,
PRESENTATION, etc.

When I wanted to copy the fonts from the Sun to my 1186, I ran across
the following anomally.  By the way, this concerns the "Medley sysout
of 19-Sep-88 17:45:52."  I could neither do a FileBrowser, DIR, or
copyfiles on the directory JIS1 which has exactly 192 entries!  If I
ran FileBrowser or DIR, recursively, from a parent directory, I would
get a list of the 192 entries.  For copyfiles I had to do the copying
piecemeal.  

A technical person from Rank Xerox France stated that this was an Unix
problem concerning large directories.  Unfortunately, I have managed
these functions on other directories larger than 192 (the largest yet
has 1097 entries).

Does anybody know of the problem or have a solution?  Is it fixed in
Medley 1.1 (which hasn't made it to Europe, yet ;-() ?

Thanks in advance,

Ralph P. Sobek			  Disclaimer: The above ruminations are my own.
ralph@laas.laas.fr			   Addresses are ordered by importance.
ralph@laas.uucp, or ...!uunet!mcvax!laas!ralph		If all else fails, try:
SOBEK@FRMOP11.BITNET				      sobek@eclair.Berkeley.EDU

shih.envos@XEROX.COM (05/18/89)

I'm assuming you were using TCPFTP on the 1186 to copy files from your Sun
to your 1186?

If so, you're probably getting bitten by the following (at least this is
what I think is going on):

The Unix FTP program (and most Unix utilities, actually), declares fixed
string buffers to hold the argument line, internal strings, etc.

When the shell (or other program) expands * to be the a very large
directory, that string can exceed the size of the buffer.  In C programs,
that simply overwrites other storage space, quietly.  What I think is
happening is, FTP ends up returning a truncated, possibly illegal
(non-null-terminated) string of filenames.

The problem is consequently not in the number of files, but in the total
length of the names.  When you use *, the relative pathname length of
course depends on your specification.
 (e.g. foodir/* is different than being in foodir and using *).

Anyway, this problem in FTP  suffices to confuse code further upstream.

I recall tracking this down once, there is probably an AR on this
somewhere, but its a Unix problem, not Lisp's.  I recall you can
demonstrate this by using FTP to attempt to copy that directory from one
Sun to another.


The workaround would be to copy the files in two passes.

p.s.  That's one of the reasons that Medley-Sun's distribution has multiple
directories for the fonts.

-Frank Shih
-(ex)Envos Dev. Mgr., and one-time TCP hacker