LSTOWN-L Archives

LISTSERV List Owners' Forum

LSTOWN-L

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Rich Greenberg <[log in to unmask]>
Mon, 2 Aug 1999 14:30:28 PDT
text/plain (67 lines)
On Aug 1,  5:19pm, "Michael S. Johnson" wrote:

} Related to this question is how should an FTP client (or even a mere
} mortal), when connecting to a VM/CMS server, determine the true file size
} (in bytes) of any of the files?
}
} Scenario:
}
} 1. open an anonymous FTP connection to BROWNVM.BROWN.EDU
} 2. CD to LISTSERV.1AC
} 3. DIR
}
} Output:
}
} [...]
} fn       ft       f/v       rcl       nrecs        ?  last modified date
} -------- ------   -         --        ---          -  ------- --------
} NAUSICAA DIGEST   V         79        244          2  8/01/99 20:00:47
} [...]
} NAUSICAA LOG9908A V         79        266          3  8/01/99 20:00:47
} [...]
}
} Where:
}   fn    = file name
}   ft    = file type
}   f/v   = fixed/variable record length
}   rcl   = record length
}   nrecs = number of records
}   ?     = (what is this column?)
}
} >From this data, how do I come up with the true file size after downloading
} (which is 7,943 bytes for NAUSICAA.DIGEST and 10,841 bytes for
} NAUSICAA.LOG9908A)?

You can't.  For VM, the record length is the length of the longest
record in the file.  This is NOT a ListServ problem,  its just an
artifact of the VM file system.  While you can't find the TRUE file size
from the display, You can determine a maximum.

The largest that the LOG9908A file could be is:

(79*266) + 266 if the destination is a unix or Mac system or
(79*266) + (266*2) for a PC.

This is the length of the largest record times the number of records,
plus the lineends that FTP will add (VM doesn't have lineends in the
file).

As a guess, the next to last column (the "?" col) is the number of
blocks the file uses, but unless you know the size of these blocks its
little help.  The possible sizes of these blocks is 512, 1024, 2048 or
4096 and VM packs the records into these blocks.  Based on the actual
sizes you came up with,  this VM system is probably using 4k blocks
(which is the most commonly used size).  This can also give you an
approximation of the file size.  If "n" is the number of blocks,

    4096*n >= filesize >= (4096*(n-1))+1

(again you need to add in an allowance for the lineends.)

--
Rich Greenberg   Work:  Rich.Greenberg atsign worldspan.com   +1 770-563-6656
N6LRT   Marietta, GA, USA   Play: richgr atsign netcom.com    +1 770-321-6507
Eastern time zone.   I speak for myself & my dogs only.     VM'er since CP-67
Canines:Val(Chinook,CGC,TT),Red(Husky,(RIP)),Shasta(Husky,TT) Owner:Chinook-L
Atlanta Siberian Husky Rescue.  Adopt a homeless Husky.  Asst Owner:Sibernet-L

ATOM RSS1 RSS2